Skip to content

Commit

Permalink
[dist] Simplify authentication smoketest
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel committed Mar 23, 2017
1 parent bbe1ff3 commit 9718936
Showing 1 changed file with 12 additions and 7 deletions.
@@ -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

0 comments on commit 9718936

Please sign in to comment.