Sha256: c3b7f7187e7857483fa692939bf4d4fe16ff0ef7f5fb80eafa74c6d9c3dbc6ee

Contents?: true

Size: 712 Bytes

Versions: 2

Compression:

Stored size: 712 Bytes

Contents

require 'spec_helper'

describe ProviderAccount do
  describe "Dummy Model relationships" do
    before(:each) do
      Tim::ProviderImage.any_instance.stub(:create_factory_provider_image).and_return(true)
      Tim::TargetImage.any_instance.stub(:create_factory_target_image).and_return(true)
      Tim::ProviderImage.any_instance.stub(:imported?).and_return(false)
    end

    it 'should have many provider images' do
      provider_account = ProviderAccount.new
      2.times do
        provider_account.provider_images << FactoryGirl.build(:provider_image_with_full_tree)
      end
      provider_account.save!
      ProviderAccount.find(provider_account).provider_images.size.should == 2
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tim-0.3.0 spec/models/dummy/provider_account_spec.rb
tim-0.2.0 spec/models/dummy/provider_account_spec.rb