Update specs to find logout link

This commit is contained in:
Brenda Wallace
2019-12-06 18:31:56 +13:00
parent 2effbcdad5
commit b999d89bf1
3 changed files with 5 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ describe "Changing locales", js: true do
# Login then log out, to ensure we're now logged out
login_as member
visit root_path
click_link member.login_name
click_link 'Sign out'
expect(page).to have_content("a community of food gardeners.")
visit root_path(locale: 'ja')

View File

@@ -15,6 +15,7 @@ describe "signin", js: true do
visit crops_path # some random page
click_link 'Sign in'
login
click_link member.login_name
expect(page).to have_content("Sign out")
end

View File

@@ -9,6 +9,7 @@ describe "signout" do
fill_in 'Login', with: member.login_name
fill_in 'Password', with: member.password
click_button 'Sign in'
click_link member.login_name
click_link 'Sign out'
expect(current_path).to eq crops_path
end
@@ -23,7 +24,8 @@ describe "signout" do
click_button 'Sign in'
# expect(page).to have_http_status(200)
expect(current_path).to eq path
click_link 'Sign out'
click_link member.login_name
click_link 'Sign out'
# expect(page).to have_http_status(200)
expect(current_path).to eq new_member_session_path
end