Sha256: 0b4f704f6019f096814f00055a853b05e8fc57f15f8515ed6e99d796f277f40b

Contents?: true

Size: 548 Bytes

Versions: 16

Compression:

Stored size: 548 Bytes

Contents

require 'test_helper'

class SignInTest < ActiveSupport::IntegrationCase

  test 'failed sign in' do
    sign_in_as 'bob', 'secret'

    assert_equal sign_in_path, current_path
    within '.flash.alert' do
      assert page.has_content?('Sorry, we did not recognise you.')
    end
  end

  test 'successful sign in' do
    user_factory 'Bob', 'bob', 'secret'
    sign_in_as 'bob', 'secret'

    assert_equal root_path, current_path
    within '.flash.notice' do
      assert page.has_content?('You have successfully signed in.')
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
quo_vadis-1.4.2 test/integration/sign_in_test.rb
quo_vadis-1.4.1 test/integration/sign_in_test.rb
quo_vadis-1.4.0 test/integration/sign_in_test.rb
quo_vadis-1.3.2 test/integration/sign_in_test.rb
quo_vadis-1.3.1 test/integration/sign_in_test.rb
quo_vadis-1.3.0 test/integration/sign_in_test.rb
quo_vadis-1.2.3 test/integration/sign_in_test.rb
quo_vadis-1.2.2 test/integration/sign_in_test.rb
quo_vadis-1.2.1 test/integration/sign_in_test.rb
quo_vadis-1.2.0 test/integration/sign_in_test.rb
quo_vadis-1.1.2 test/integration/sign_in_test.rb
quo_vadis-1.1.1 test/integration/sign_in_test.rb
quo_vadis-1.1.0 test/integration/sign_in_test.rb
quo_vadis-1.0.7 test/integration/sign_in_test.rb
quo_vadis-1.0.6 test/integration/sign_in_test.rb
quo_vadis-1.0.5 test/integration/sign_in_test.rb