Sha256: 6dde9944b694a257a1e661d6374f2c9ac002f14a0209cdb03b8906e797fb3d19

Contents?: true

Size: 562 Bytes

Versions: 1

Compression:

Stored size: 562 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper.rb'

class UserSessionBaseTest < ActiveSupport::TestCase
  def test_scope
    UserSession.with_scope(:find_options => {:conditions => "awesome = 1"}, :id => "some_id") do
      assert_equal({:find_options => {:conditions => "awesome = 1"}, :id => "some_id"}, UserSession.scope)
    end
    assert_equal nil, UserSession.scope
  end
  
  def test_with_scope
    assert_raise(ArgumentError) { UserSession.with_scope }
    # the rest of the method was tested in test_scope
  end
  
  def test_initialize
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
authlogic-1.0.0 test/user_session_scopes_test.rb