Files
old-holivud2/spec/features/guest_account_signup_spec.rb
2020-05-31 22:38:19 +02:00

42 lines
1.2 KiB
Ruby

require "rails_helper"
feature "Guest account sign up" do
scenario "creates a new account and signs in successfully" do
visit new_account_path
fill_in "Email", with: "user+1@test.com"
fill_in "Password", with: "password"
fill_in "Account Name", with: "Test Account"
click_on "Start Free Trial"
expect(page).to have_content "We are excited to help you organize and automate your media projects. Click below to create your first project and get started."
expect(page).to have_content "Welcome"
expect(page).to have_link "Create Your First Project"
end
scenario "navivates to new account page when account creation fails" do
visit new_account_path
fill_in "Email", with: "user+1@test.com"
fill_in "Password", with: "password"
fill_in "Account Name", with: ""
click_on "Start Free Trial"
expect(page).to have_content "Sign Up"
end
scenario "navivates to new account page when user creation fails" do
visit new_account_path
fill_in "Email", with: ""
fill_in "Password", with: "password"
fill_in "Account Name", with: "Test Account"
click_on "Start Free Trial"
expect(page).to have_content "Sign Up"
end
end