Sha256: 6ef9853804241fe93a531ea3be2ed9aa7b2c0d4f7cb45c7ac359a4bfa91bced5

Contents?: true

Size: 667 Bytes

Versions: 13

Compression:

Stored size: 667 Bytes

Contents

require 'spec_helper'

describe User do

  describe "proxy_deposit_rights" do
    subject { FactoryGirl.build :user }
    let(:user1) { FactoryGirl.create :user }
    let(:user2) { FactoryGirl.create :user }
    before do
      subject.can_receive_deposits_from << user1
      subject.can_make_deposits_for << user2
      subject.save!
    end
    it "can_receive_deposits_from" do
      subject.can_receive_deposits_from.should == [user1]
      user1.can_make_deposits_for.should == [subject]
    end
    it "can_make_deposits_for" do
      subject.can_make_deposits_for.should == [user2]
      user2.can_receive_deposits_from.should == [subject]
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curate-0.6.6 spec/models/curate/user_spec.rb
curate-0.6.5 spec/models/curate/user_spec.rb
curate-0.6.4 spec/models/curate/user_spec.rb
curate-0.6.3 spec/models/curate/user_spec.rb
curate-0.6.1 spec/models/curate/user_spec.rb
curate-0.6.0 spec/models/curate/user_spec.rb
curate-0.5.6 spec/models/curate/user_spec.rb
curate-0.5.5 spec/models/curate/user_spec.rb
curate-0.5.4 spec/models/curate/user_spec.rb
curate-0.5.2 spec/models/curate/user_spec.rb
curate-0.5.1 spec/models/curate/user_spec.rb
curate-0.5.0 spec/models/curate/user_spec.rb
curate-0.4.2 spec/models/curate/user_spec.rb