Refactors query-parameter-related tests

This commit is contained in:
kikito
2015-08-27 19:05:50 +02:00
parent fb9d3097cc
commit e07ae71fff
3 changed files with 6 additions and 15 deletions

View File

@@ -119,11 +119,8 @@ feature 'Admin::Organizations' do
click_on('Verify', match: :first)
uri = URI.parse(current_url)
query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys
expect(query_params[:filter]).to eq('pending')
expect(query_params[:page]).to eq('2')
expect(current_url).to include('filter=pending')
expect(current_url).to include('page=2')
end
end

View File

@@ -151,11 +151,8 @@ feature 'Moderate Comments' do
click_link('Ignore', match: :first, exact: true)
uri = URI.parse(current_url)
query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys
expect(query_params[:filter]).to eq('pending_flag_review')
expect(query_params[:page]).to eq('2')
expect(current_url).to include('filter=pending_flag_review')
expect(current_url).to include('page=2')
end
feature 'A flagged comment exists' do

View File

@@ -94,11 +94,8 @@ feature 'Moderate debates' do
click_link('Ignore', match: :first, exact: true)
uri = URI.parse(current_url)
query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys
expect(query_params[:filter]).to eq('pending_flag_review')
expect(query_params[:page]).to eq('2')
expect(current_url).to include('filter=pending_flag_review')
expect(current_url).to include('page=2')
end
feature 'A flagged debate exists' do