Sha256: 86247e25f387ad1ade3a4b82fb3c467f4895eb42bbcf9d2d2898d8ffa8501e57

Contents?: true

Size: 529 Bytes

Versions: 91

Compression:

Stored size: 529 Bytes

Contents

require 'spec_helper'

describe Permission do
  it { should belong_to(:project) }
  it { should belong_to(:membership) }
  it { should belong_to(:user) }

  it "caches the user from the account membership" do
    membership = Factory(:membership)
    permission = Factory(:permission,
                                 :membership => membership)
    permission.user_id.should == membership.user_id
  end

  it "doesn't allow the user to be assigned" do
    expect { subject.user = Factory.build(:user) }.to raise_error
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
saucy-0.8.1 spec/models/permission_spec.rb
saucy-0.8.0 spec/models/permission_spec.rb
saucy-0.7.3 spec/models/permission_spec.rb
saucy-0.7.2 spec/models/permission_spec.rb
saucy-0.7.1 spec/models/permission_spec.rb
saucy-0.7.0 spec/models/permission_spec.rb
saucy-0.6.1 spec/models/permission_spec.rb
saucy-0.6.0 spec/models/permission_spec.rb
saucy-0.5.5 spec/models/permission_spec.rb
saucy-0.5.4 spec/models/permission_spec.rb
saucy-0.5.3 spec/models/permission_spec.rb
saucy-0.5.2 spec/models/permission_spec.rb
saucy-0.5.1 spec/models/permission_spec.rb
saucy-0.5.0 spec/models/permission_spec.rb
saucy-0.4.10 spec/models/permission_spec.rb
saucy-0.4.9 spec/models/permission_spec.rb
saucy-0.2.28.1 spec/models/permission_spec.rb
saucy-0.4.8 spec/models/permission_spec.rb
saucy-0.4.7 spec/models/permission_spec.rb
saucy-0.4.6 spec/models/permission_spec.rb