Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dist] Simplify authentication smoketest
- Loading branch information
1 parent
bbe1ff3
commit 9718936
Showing
1 changed file
with
12 additions
and
7 deletions.
There are no files selected for viewing
19 changes: 12 additions & 7 deletions
19
.../features/0010_signup_as_testuser_spec.rb → ...spec/features/0010_authentication_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
require "spec_helper" | ||
|
||
RSpec.describe "Sign Up & Login" do | ||
it "should be able to sign up successfully and logout" do | ||
RSpec.describe "Authentication" do | ||
after(:example) do | ||
logout | ||
end | ||
|
||
it "should be able to sign up" do | ||
visit "/" | ||
expect(page).to have_content("Log In") | ||
fill_in 'login', with: 'test_user' | ||
fill_in 'email', with: 'test_user@openqa.com' | ||
fill_in 'pwd', with: 'opensuse' | ||
click_button('Sign Up') | ||
expect(page).to have_content("The account 'test_user' is now active.") | ||
within("div#subheader") do | ||
click_link('Logout') | ||
end | ||
expect(page).to have_link('link-to-user-home') | ||
end | ||
end | ||
|
||
it "should be able to login" do | ||
login | ||
expect(page).to have_link('link-to-user-home') | ||
end | ||
end |