0002-Unescape-href-values-before-asserting.patch

Marius BALTEANU, 2021-01-09 21:25

Download (1.94 KB)

View differences:

test/functional/issues_controller_test.rb
2353 2353

  
2354 2354
    assert_select 'div#issue_tree span.issues-stat' do
2355 2355
      assert_select 'span.badge', text: '4'
2356
      assert_select 'span.open a[href=?]', "/issues?parent_id=~1&set_filter=true&status_id=o", text: '3 open'
2357
      assert_select 'span.closed a[href=?]', "/issues?parent_id=~1&set_filter=true&status_id=c", text: '1 closed'
2356
      assert_select 'span.open a', text: '3 open'
2357
      assert_equal CGI.unescape(css_select('span.open a').first.attr('href')),
2358
                   "/issues?parent_id=~1&set_filter=true&status_id=o"
2359

  
2360
      assert_select 'span.closed a', text: '1 closed'
2361
      assert_equal CGI.unescape(css_select('span.closed a').first.attr('href')),
2362
                   "/issues?parent_id=~1&set_filter=true&status_id=c"
2358 2363
    end
2359 2364
  end
2360 2365

  
......
2365 2370
    assert_response :success
2366 2371

  
2367 2372
    assert_select 'div#issue_tree span.issues-stat' do
2368
      assert_select 'span.open a[href=?]', "/issues?parent_id=~1&set_filter=true&status_id=o", text: '1 open'
2373
      assert_select 'span.open a', text: '1 open'
2374
      assert_equal CGI.unescape(css_select('span.open a').first.attr('href')),
2375
                   "/issues?parent_id=~1&set_filter=true&status_id=o"
2369 2376
      assert_select 'span.closed', text: '0 closed'
2370 2377
      assert_select 'span.closed a', 0
2371 2378
    end
2372
-