Sha256: 55ac6f623c8fef0b93ac8202e2008e8b4f439d09291ea1cbc4f72978746c4add

Contents?: true

Size: 594 Bytes

Versions: 37

Compression:

Stored size: 594 Bytes

Contents

require 'spec_helper'

feature "Login" do

  scenario "Login with invalid credentials" do
    sign_in_with_invalid_email
    page.should have_content "invalid"
  end

  scenario "Login with valid credentials" do
    sign_in
    page.should have_content "Admin users"
  end

  scenario "User logs out" do
    sign_in
    click_link "Logout"
    page.should have_content "Please sign in"
  end

  def sign_in_with_invalid_email
    @user = create(:admin_user)
    visit "/admin"
    fill_in "Email", with: @user.email
    fill_in "Password", with: "wrongpass"
    click_button "Login"
  end

end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
brightcontent-core-2.0.33 spec/features/login_spec.rb
brightcontent-core-2.0.31 spec/features/login_spec.rb
brightcontent-core-2.0.30 spec/features/login_spec.rb
brightcontent-core-2.0.29 spec/features/login_spec.rb
brightcontent-core-2.0.28 spec/features/login_spec.rb
brightcontent-core-2.0.27 spec/features/login_spec.rb
brightcontent-core-2.0.26 spec/features/login_spec.rb
brightcontent-core-2.0.25 spec/features/login_spec.rb
brightcontent-core-2.0.24 spec/features/login_spec.rb
brightcontent-core-2.0.23 spec/features/login_spec.rb
brightcontent-core-2.0.22 spec/features/login_spec.rb
brightcontent-core-2.0.21 spec/features/login_spec.rb
brightcontent-core-2.0.20 spec/features/login_spec.rb
brightcontent-core-2.0.19 spec/features/login_spec.rb
brightcontent-core-2.0.18 spec/features/login_spec.rb
brightcontent-core-2.0.17 spec/features/login_spec.rb
brightcontent-core-2.0.16 spec/features/login_spec.rb
brightcontent-core-2.0.15 spec/features/login_spec.rb
brightcontent-core-2.0.14 spec/features/login_spec.rb
brightcontent-core-2.0.13 spec/features/login_spec.rb