Sha256: cd1dadd6606768956c0bcd02f3f7f1931c6691d17df9989156c18a18a96d31ef

Contents?: true

Size: 568 Bytes

Versions: 16

Compression:

Stored size: 568 Bytes

Contents

require 'test_helper'

class BlockedTest < ActiveSupport::IntegrationCase

  test 'sign-in process can be blocked' do
    user_factory 'Bob', 'bob', 'secret'
    user_factory 'Jim', 'jim', 'secret'

    QuoVadis.blocked = Proc.new do |controller|
      controller.params[:username] == 'bob'
    end

    sign_in_as 'bob', 'secret'
    within '.flash' do
      assert page.has_content?('Sorry, your account is blocked.')
    end

    sign_in_as 'jim', 'secret'
    within '.flash' 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/blocked_test.rb
quo_vadis-1.4.1 test/integration/blocked_test.rb
quo_vadis-1.4.0 test/integration/blocked_test.rb
quo_vadis-1.3.2 test/integration/blocked_test.rb
quo_vadis-1.3.1 test/integration/blocked_test.rb
quo_vadis-1.3.0 test/integration/blocked_test.rb
quo_vadis-1.2.3 test/integration/blocked_test.rb
quo_vadis-1.2.2 test/integration/blocked_test.rb
quo_vadis-1.2.1 test/integration/blocked_test.rb
quo_vadis-1.2.0 test/integration/blocked_test.rb
quo_vadis-1.1.2 test/integration/blocked_test.rb
quo_vadis-1.1.1 test/integration/blocked_test.rb
quo_vadis-1.1.0 test/integration/blocked_test.rb
quo_vadis-1.0.7 test/integration/blocked_test.rb
quo_vadis-1.0.6 test/integration/blocked_test.rb
quo_vadis-1.0.5 test/integration/blocked_test.rb