Sha256: 20a9a784a98a6d4de7049ab832ee700617cd177f7c63496267c3a630899be4b6
Contents?: true
Size: 788 Bytes
Versions: 4
Compression:
Stored size: 788 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', '/test_helper') module Garb class SessionTest < Test::Unit::TestCase context "The Session class" do should "be able retrieve an auth_token for a user" do auth_request = mock {|m| m.expects(:auth_token).with().returns('toke') } AuthenticationRequest.expects(:new).with('email', 'password').returns(auth_request) Session.login('email', 'password') assert_equal 'toke', Session.auth_token end should "retain the email address for this session" do AuthenticationRequest.stubs(:new).returns(stub(:auth_token => 'toke')) Session.login('email', 'password') assert_equal 'email', Session.email end end end end
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
vigetlabs-garb-0.2.0 | test/unit/session_test.rb |
vigetlabs-garb-0.2.1 | test/unit/session_test.rb |
vigetlabs-garb-0.2.2 | test/unit/session_test.rb |
garb-0.2.1 | test/unit/session_test.rb |