Sha256: c51fb1413920d8dad41c698d7b15feb66079450229393c182ad2dc7ec4c879f3

Contents?: true

Size: 869 Bytes

Versions: 30

Compression:

Stored size: 869 Bytes

Contents

require 'spec_helper'

feature 'user logs in' do
  scenario 'with valid email and password' do
    log_in({ email: 'valid@example.com', password: 'password' })

    expect(page).to have_content('Logged in')
  end

  scenario 'with invalid email' do
    @_current_lines_user = FactoryGirl.create(:user)
    visit lines.login_path
    fill_in "Email", with: "invalid_email"
    fill_in "Password", with: 'sekret'
    click_button "Login"
    page.should_not have_content "Logged in"
    page.should have_content('Login')
  end

  scenario 'with blank password' do
    @_current_lines_user = FactoryGirl.create(:user, email: 'valid@example.com')
    visit lines.login_path
    fill_in "Email", with: "valid@example.com"
    fill_in "Password", with: ''
    click_button "Login"
    page.should_not have_content "Logged in"
    page.should have_content('Login')
  end 

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
lines-engine-0.6.2 spec/features/user_logs_in_spec.rb
lines-engine-0.6.1 spec/features/user_logs_in_spec.rb
lines-engine-0.6 spec/features/user_logs_in_spec.rb
lines-engine-0.5 spec/features/user_logs_in_spec.rb
lines-engine-0.4.6.4 spec/features/user_logs_in_spec.rb
lines-engine-0.4.6.3 spec/features/user_logs_in_spec.rb
lines-engine-0.4.6.1 spec/features/user_logs_in_spec.rb
lines-engine-0.4.6 spec/features/user_logs_in_spec.rb
lines-engine-0.4.5 spec/features/user_logs_in_spec.rb
lines-engine-0.4.4 spec/features/user_logs_in_spec.rb
lines-engine-0.4.2 spec/features/user_logs_in_spec.rb
lines-engine-0.4.1 spec/features/user_logs_in_spec.rb
lines-engine-0.4 spec/features/user_logs_in_spec.rb
lines-engine-0.3.3.2 spec/features/user_logs_in_spec.rb
lines-engine-0.3.3.1 spec/features/user_logs_in_spec.rb
lines-engine-0.3.3 spec/features/user_logs_in_spec.rb
lines-engine-0.3.2 spec/features/user_logs_in_spec.rb
lines-engine-0.3.1 spec/features/user_logs_in_spec.rb
lines-engine-0.3 spec/features/user_logs_in_spec.rb
lines-engine-0.2 spec/features/user_logs_in_spec.rb