Sha256: e042c289511b2d62d9cc347d277c922a87d46aa0c6e22a8643d714071aa9f1b1

Contents?: true

Size: 549 Bytes

Versions: 26

Compression:

Stored size: 549 Bytes

Contents

require 'test_helper'

class ImpersonationTest < ActiveSupport::TestCase
  
  context 'An Impersonation' do
    
    should 'generate a hash based on the id' do
      hash1 = Impersonation.hash_for(1)
      hash2 = Impersonation.hash_for(2)
      assert_not_equal(hash1, hash2)
    end
    
    should 'not generate a nil hash' do
      assert_not_nil(Impersonation.hash_for(23))
    end
    
    should 'not raise an exception for nil' do
      assert_raise(ArgumentError) do
        Impersonation.hash_for(nil)
      end
    end
    
  end
  
end

Version data entries

26 entries across 26 versions & 4 rubygems

Version Path
headstart-0.11.2 test/models/impersonation_test.rb
headstart-0.11.1 test/models/impersonation_test.rb
headstart-0.9.2 test/models/impersonation_test.rb
headstart-0.9.1 test/models/impersonation_test.rb
headstart-0.9.0 test/models/impersonation_test.rb
headstart-0.8.0 test/models/impersonation_test.rb
headstart-0.7.0 test/models/impersonation_test.rb
headstart-0.6.2 test/models/impersonation_test.rb
headstart-0.6.1 test/models/impersonation_test.rb
headstart-0.6.0 test/models/impersonation_test.rb
headstart-0.5.5 test/models/impersonation_test.rb
headstart-0.5.4 test/models/impersonation_test.rb
headstart-0.5.3 test/models/impersonation_test.rb
headstart-0.5.2 test/models/impersonation_test.rb
headstart-0.5.1 test/models/impersonation_test.rb
headstart-0.5.0 test/models/impersonation_test.rb
headstart-0.4.2 test/models/impersonation_test.rb
headstart-0.4.1 test/models/impersonation_test.rb
headstart-0.4.0 test/models/impersonation_test.rb
headstart-0.3.0 test/models/impersonation_test.rb