Sha256: e0322e040117c29e831ab8e8048cf1e489435dfc0146c8a3fcf6b233fb8d5efc

Contents?: true

Size: 615 Bytes

Versions: 4

Compression:

Stored size: 615 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
    within "h1" do
      page.should have_content "Blogs"
    end
  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

4 entries across 4 versions & 1 rubygems

Version Path
brightcontent-core-2.1.3 spec/features/login_spec.rb
brightcontent-core-2.1.2 spec/features/login_spec.rb
brightcontent-core-2.1.1 spec/features/login_spec.rb
brightcontent-core-2.1.0 spec/features/login_spec.rb