added javascript to the test

This commit is contained in:
juandefelix
2015-09-19 20:05:09 -05:00
parent 311827a83b
commit 5e4f134c72

View File

@@ -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