From f40c09a8b750d5d317a22af7186bde5c940b6924 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 16 Jul 2013 13:06:48 +0200 Subject: ensure the page has been reloaded before testing current_path This test would fail sometimes on assert_equal '/', current_path I believe it was a timing issue. page.has_content? will wait for the content to show up. So afterwards the current_path should always be correct. --- users/test/integration/browser/account_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'users/test') diff --git a/users/test/integration/browser/account_test.rb b/users/test/integration/browser/account_test.rb index 9f6d067..ce63baf 100644 --- a/users/test/integration/browser/account_test.rb +++ b/users/test/integration/browser/account_test.rb @@ -16,6 +16,7 @@ class AccountTest < BrowserIntegrationTest click_on 'Sign Up' assert page.has_content?("Welcome #{username}") click_on 'Logout' + assert page.has_content?("Sign Up") assert_equal '/', current_path end -- cgit v1.2.3