Sha256: 310790c9d780d249c82382da1b011505c96b9c21d89b9f49ba97fee612066f0c

Contents?: true

Size: 660 Bytes

Versions: 27

Compression:

Stored size: 660 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Castronaut::AuthenticationResult do
  
  it "exposes the given username at :username" do
    Castronaut::AuthenticationResult.new('billy').username.should == 'billy'
  end
  
  it "exposes the given message at :error_message" do
    Castronaut::AuthenticationResult.new(anything, 'my error').error_message.should == 'my error'
  end
  
  it "is valid if there is no error message" do
    Castronaut::AuthenticationResult.new(anything, nil).should be_valid
  end

  it "is invalid if there is an error message" do
    Castronaut::AuthenticationResult.new(anything, 'bad').should be_invalid
  end
end

Version data entries

27 entries across 27 versions & 6 rubygems

Version Path
3mix-castronaut-0.5.0.2 spec/castronaut/authentication_result_spec.rb
masover-castronaut-0.4.4.4 spec/castronaut/authentication_result_spec.rb
masover-castronaut-0.4.4.5 spec/castronaut/authentication_result_spec.rb
masover-castronaut-0.5.0.1 spec/castronaut/authentication_result_spec.rb
p8-castronaut-0.6.1.1 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.2.0 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.2.5 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.3.0 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.3.5 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.3.6 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.4.1 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.4.2 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.4.3 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.4.4 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.4.5 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.4.6 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.5.0 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.5.1 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.5.2 spec/castronaut/authentication_result_spec.rb
relevance-castronaut-0.5.3 spec/castronaut/authentication_result_spec.rb