added javascript to the test
This commit is contained in:
@@ -50,14 +50,13 @@ feature 'Debates' do
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'Show: "Back" link directs to previous page' do
|
||||
scenario 'Show: "Back" link directs to previous page', :js do
|
||||
debate = create(:debate, title: 'Test Debate 1')
|
||||
|
||||
visit debates_path( order: :hot_score, page: 1)
|
||||
visit debates_path(order: :hot_score, page: 1)
|
||||
find(:xpath, "//a[@href='/debates/#{debate.id}']", match: :first).click
|
||||
click_link('Back')
|
||||
|
||||
expect(current_url).to include(debates_path order: :hot_score, page: 1)
|
||||
|
||||
expect(find_link('Back')[:href]).to include(debates_path order: :hot_score, page: 1)
|
||||
end
|
||||
|
||||
scenario 'Create' do
|
||||
|
||||
Reference in New Issue
Block a user