Sha256: bc642826a03b004df2c8a699510786081eb7c3f9c117590f37f7a7e560fb2aba

Contents?: true

Size: 401 Bytes

Versions: 3

Compression:

Stored size: 401 Bytes

Contents

require 'spec_helper'

describe AccountMembership do
  it { should belong_to(:account) }
  it { should belong_to(:user) }
  it { should validate_presence_of(:account_id) }
  it { should validate_presence_of(:user_id) }

  describe "given an existing account membership" do
    before { Factory(:account_membership) }
    it { should validate_uniqueness_of(:user_id).scoped_to(:account_id) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
saucy-0.1.3 spec/models/account_membership_spec.rb
saucy-0.1.2 spec/models/account_membership_spec.rb
saucy-0.1.1 spec/models/account_membership_spec.rb