Sha256: 4c83b6f2e1d76e97cffb66a0ef1385c2b56495fbd78d5d61483ce779163fa2a7

Contents?: true

Size: 731 Bytes

Versions: 1

Compression:

Stored size: 731 Bytes

Contents

require 'test_helper'

class SignInPersonTest < ActiveSupport::IntegrationCase

  # NOTE: it would be great if I could figure out how to re-initialise the method's
  # mixed into the controller with the new model.
  test 'successful sign in for a non-user model' do
    puts <<-END
    NOTE: this test (#{__FILE__}) has to be run individually like this:

    1. Change lib/quo_vadis.rb's @@model to 'Person'.
    2. Uncomment the test code.
    3. bundle exec ruby -Ilib:test #{__FILE__}

    END

    person_factory 'James', 'jim', 'secret'
    sign_in_as 'jim', '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

1 entries across 1 versions & 1 rubygems

Version Path
quo_vadis-1.2.0 test/integration/sign_in_person_test.rb