Skip to content

Commit

Permalink
Merge pull request #183 from acmetech/master
Browse files Browse the repository at this point in the history
revert 36a8c17
  • Loading branch information
acmetech committed Feb 4, 2014
2 parents b6428b5 + 74aa970 commit 974b488
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/socializer/audience.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Audience < ActiveRecord::Base
belongs_to :activity
belongs_to :activity_object

validates :activity_id, presence: true, uniqueness: { scope: :activity_object_id }
# validates :activity_id, presence: true, uniqueness: { scope: :activity_object_id }
validates :privacy_level, presence: true

def object
Expand Down
3 changes: 2 additions & 1 deletion spec/models/socializer/audience_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ module Socializer

context 'validations' do
it { expect(audience).to validate_presence_of(:privacy_level) }
it { expect(create(:socializer_audience)).to validate_uniqueness_of(:activity_id).scoped_to(:activity_object_id) }
# it { expect(audience).to validate_presence_of(:activity_id) }
# it { expect(create(:socializer_audience)).to validate_uniqueness_of(:activity_id).scoped_to(:activity_object_id) }
end

it { expect(enumerize(:privacy_level).in(:public, :circles, :limited).with_default(:public)) }
Expand Down

0 comments on commit 974b488

Please sign in to comment.