Project

General

Profile

Patch #26125 » 0004-Add-test-assertions-to-the-four-controller-test-case.patch

Mischa The Evil, 2017-06-09 00:13

View differences:

test/functional/calendars_controller_test.rb
36 36
        :project_id => 1
37 37
      }
38 38
    assert_response :success
39

  
40
    # query form
41
    assert_select 'form#query_form' do
42
      assert_select 'div#query_form_with_buttons.hide-when-print' do
43
        assert_select 'div#query_form_content' do
44
          assert_select 'fieldset#filters.collapsible'
45
        end
46
        assert_select 'p.contextual'
47
        assert_select 'p.buttons'
48
      end
49
    end
39 50
  end
40 51

  
41 52
  def test_show_should_run_custom_queries
test/functional/gantts_controller_test.rb
35 35
      }
36 36
    assert_response :success
37 37

  
38
    # query form
39
    assert_select 'form#query_form' do
40
      assert_select 'div#query_form_with_buttons.hide-when-print' do
41
        assert_select 'div#query_form_content' do
42
          assert_select 'fieldset#filters.collapsible'
43
          assert_select 'fieldset#options'
44
        end
45
        assert_select 'p.contextual'
46
        assert_select 'p.buttons'
47
      end
48
    end
49

  
38 50
    # Issue with start and due dates
39 51
    i = Issue.find(1)
40 52
    assert_not_nil i.due_date
test/functional/issues_controller_test.rb
94 94
      }
95 95
    assert_response :success
96 96

  
97
    # query form
98
    assert_select 'form#query_form' do
99
      assert_select 'div#query_form_with_buttons.hide-when-print' do
100
        assert_select 'div#query_form_content' do
101
          assert_select 'fieldset#filters.collapsible'
102
          assert_select 'fieldset#options'
103
        end
104
        assert_select 'p.buttons'
105
      end
106
    end
107

  
97 108
    assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/
98 109
    assert_select 'a[href="/issues/5"]', 0
99 110
  end
test/functional/time_entry_reports_controller_test.rb
37 37
  def test_report_at_project_level
38 38
    get :report, :params => {:project_id => 'ecookbook'}
39 39
    assert_response :success
40

  
41
    # query form
42
    assert_select 'form#query_form' do
43
      assert_select 'div#query_form_with_buttons.hide-when-print' do
44
        assert_select 'div#query_form_content' do
45
          assert_select 'fieldset#filters.collapsible'
46
          assert_select 'fieldset#options'
47
        end
48
        assert_select 'p.buttons'
49
      end
50
    end
51

  
40 52
    assert_select 'form#query_form[action=?]', '/projects/ecookbook/time_entries/report'
41 53
  end
42 54

  
(12-12/12)