Sha256: bc816377ce6ff89aacebeb7e6308f5a36b4cbeb87ef2f84cf7a6d974ebfd8dd1

Contents?: true

Size: 377 Bytes

Versions: 10

Compression:

Stored size: 377 Bytes

Contents

require 'spec_helper'

module Spree
  describe User do
    let(:user) { User.new }

    it "can generate an API key" do
      user.should_receive(:save!)
      user.generate_api_key!
      user.api_key.should_not be_blank
    end

    it "can clear an API key" do
      user.should_receive(:save!)
      user.clear_api_key!
      user.api_key.should be_blank
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_api-1.1.6 spec/models/spree/user_spec.rb
spree_api-1.1.5 spec/models/spree/user_spec.rb
spree_api-1.1.4 spec/models/spree/user_spec.rb
spree_api-1.1.3 spec/models/spree/user_spec.rb
spree_api-1.1.2 spec/models/spree/user_spec.rb
spree_api-1.1.2.rc1 spec/models/spree/user_spec.rb
spree_api-1.1.1 spec/models/spree/user_spec.rb
spree_api-1.1.0 spec/models/spree/user_spec.rb
spree_api-1.1.0.rc2 spec/models/spree/user_spec.rb
spree_api-1.1.0.rc1 spec/models/spree/user_spec.rb