Sha256: 65ac84339ceeb3c628d0332efcd3a16b1558b9cab47a4d574ce7cffd548bc46d

Contents?: true

Size: 881 Bytes

Versions: 9

Compression:

Stored size: 881 Bytes

Contents

# encoding utf-8

require 'test_helper'
require 'capybara/rails'
require 'bbq/test_user'
require 'bbq/devise'

class DeviseTestUser < Bbq::TestUser
  include Bbq::Devise
end

class BbqTwoSimultaneousUsersTest < Test::Unit::TestCase

  Text = "BBQ"

  def teardown
    User.find_by_email(@andy.email).try(:destroy)
    User.find_by_email(@dhh.email).try(:destroy)
  end

  def test_user_register
    @andy = DeviseTestUser.new
    @dhh =  DeviseTestUser.new

    @andy.register
    @dhh.register

    @andy.see?(Text)
    @dhh.see?(Text)

    @andy.logout
    @dhh.logout

    @andy.not_see?(Text)
    @dhh.not_see?(Text)

    @andy.login
    @andy.see?(Text)
    @dhh.not_see?(Text)

    @dhh.login
    @andy.see?(Text)
    @dhh.see?(Text)

    @andy.logout
    @andy.not_see?(Text)
    @dhh.see?(Text)

    @dhh.logout
    @andy.not_see?(Text)
    @dhh.not_see?(Text)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bbq-0.2.1 test/unit/bbq_two_simultaneous_users_test.rb
bbq-0.2.0 test/unit/bbq_two_simultaneous_users_test.rb
bbq-0.1.0 test/unit/bbq_two_simultaneous_users_test.rb
bbq-0.0.4 test/unit/bbq_two_simultaneous_users_test.rb
bbq-0.0.3 test/unit/bbq_two_simultaneous_users_test.rb
bbq-0.0.2 test/unit/bbq_two_simultaneous_users_test.rb
bbq-0.0.2.beta.3 test/unit/bbq_two_simultaneous_users_test.rb
bbq-0.0.2.beta.2 test/unit/bbq_two_simultaneous_users_test.rb
bbq-0.0.2.beta.1 test/unit/bbq_two_simultaneous_users_test.rb