Sha256: 8695849732a9847396f8e70877c7f50830781788a8b60900aa289f150119f09c
Contents?: true
Size: 589 Bytes
Versions: 2
Compression:
Stored size: 589 Bytes
Contents
require 'spec_helper' describe User do let(:user) { User.new } context "#generate_api_key!" do it "should set authentication_token to a 20 char SHA" do user.generate_api_key! user.authentication_token.to_s.length.should == 20 end end context "#anonymous?" do it "should not be anonymous" do user.should_not be_anonymous end end context "#clear_api_key!" do it "should remove the existing api_key" do user.authentication_token = "FOOFAH" user.clear_api_key! user.authentication_token.should be_blank end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
MyCommerceapi-1.0.0 | api/spec/models/user_spec.rb |
MyCommerce-0.0.3 | api/spec/models/user_spec.rb |