2016-03-08 00:52:19 +00:00
|
|
|
# frozen_string_literal: true
|
2016-10-04 18:10:29 +00:00
|
|
|
Capybara::SpecHelper.spec '#go_back', requires: [:js] do
|
2013-10-05 18:23:51 +00:00
|
|
|
it "should fetch a response from the driver from the previous page" do
|
|
|
|
@session.visit('/')
|
2013-11-14 17:43:36 +00:00
|
|
|
expect(@session).to have_content('Hello world!')
|
2013-10-05 18:23:51 +00:00
|
|
|
@session.visit('/foo')
|
2013-11-14 17:43:36 +00:00
|
|
|
expect(@session).to have_content('Another World')
|
2013-10-05 18:23:51 +00:00
|
|
|
@session.go_back
|
2013-11-14 17:43:36 +00:00
|
|
|
expect(@session).to have_content('Hello world!')
|
2013-10-05 18:23:51 +00:00
|
|
|
end
|
|
|
|
end
|