Sha256: 2b8710c05bc971aad787ed039ff5ec1c49cb3c654868a6aa202a614e0870cae0

Contents?: true

Size: 676 Bytes

Versions: 7

Compression:

Stored size: 676 Bytes

Contents

require 'spec_helper'

try_spec do
  require './spec/fixtures/api_user'

  describe DataMapper::TypesFixtures::APIUser do
    supported_by :all do
      subject { described_class.new(:name => 'alice') }

      let(:original_api_key) { subject.api_key }

      it "should have a default value" do
        original_api_key.should_not be_nil
      end

      it "should preserve the default value" do
        subject.api_key.should == original_api_key
      end

      it "should generate unique API Keys for each resource" do
        other_resource = described_class.new(:name => 'eve')

        other_resource.api_key.should_not == original_api_key
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
ardm-types-1.2.3 spec/integration/api_key_spec.rb
ardm-types-1.2.2 spec/integration/api_key_spec.rb
dm-types-1.2.2 spec/integration/api_key_spec.rb
dm-types-1.2.1 spec/integration/api_key_spec.rb
dm-types-1.2.0 spec/integration/api_key_spec.rb
dm-types-1.2.0.rc2 spec/integration/api_key_spec.rb
dm-types-1.2.0.rc1 spec/integration/api_key_spec.rb