diff options
author | Alex Denisov <1101.debian@gmail.com> | 2012-09-10 00:18:28 +0400 |
---|---|---|
committer | Alex Denisov <1101.debian@gmail.com> | 2012-09-10 00:18:28 +0400 |
commit | a86bd87afcb8ba8221aa72562a6591139fa763c0 (patch) | |
tree | 647d5115dd83b58290154b8c136f9d6d9d640fab /spec/models | |
parent | a56cec113204130385e0fbc3f2223d81101357ef (diff) |
User joined project event added
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/event_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index aaffda3199e..81459233cf6 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -49,4 +49,15 @@ describe Event do it { @event.branch_name.should == "master" } it { @event.author.should == @user } end + + describe "New team mamber" do + let(:project) {Factory.create :project} + let(:new_user) {Factory.create :user} + it "should create event" do + UsersProject.observers.enable :users_project_observer + expect{ + UsersProject.bulk_import(project, [new_user.id], UsersProject::DEVELOPER) + }.to change{Event.count}.by(1) + end + end end |