Project

General

Profile

« Previous | Next » 

Revision 13435

Don't change setting for other tests.

View differences:

sandbox/rails-4.1/test/integration/issues_test.rb
111 111
  end
112 112

  
113 113
  def test_pagination_links_on_index
114
    Setting.per_page_options = '2'
115
    get '/projects/ecookbook/issues'
114
    with_settings :per_page_options => '2' do
115
      get '/projects/ecookbook/issues'
116 116

  
117
    assert_tag :a, :content => '2',
118
                   :attributes => { :href => '/projects/ecookbook/issues?page=2' }
119

  
117
      assert_tag :a, :content => '2',
118
                     :attributes => { :href => '/projects/ecookbook/issues?page=2' }
119
    end
120 120
  end
121 121

  
122 122
  def test_pagination_links_on_index_without_project_id_in_url
123
    Setting.per_page_options = '2'
124
    get '/issues', :project_id => 'ecookbook'
125

  
126
    assert_tag :a, :content => '2',
127
                   :attributes => { :href => '/projects/ecookbook/issues?page=2' }
128

  
123
    with_settings :per_page_options => '2' do
124
      get '/issues', :project_id => 'ecookbook'
125
  
126
      assert_tag :a, :content => '2',
127
                     :attributes => { :href => '/projects/ecookbook/issues?page=2' }
128
    end
129 129
  end
130 130

  
131 131
  def test_issue_with_user_custom_field

Also available in: Unified diff