mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-02 21:51:01 -05:00
Update specs to find logout link
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user