diff options
author | Alex Denisov <1101.debian@gmail.com> | 2012-09-10 01:27:47 +0400 |
---|---|---|
committer | Alex Denisov <1101.debian@gmail.com> | 2012-09-10 01:27:47 +0400 |
commit | 1f240b09ed5f9f5476a863dd2f906398e5a9f0d4 (patch) | |
tree | 043a9a48f08507b96064cef157ff733ca89ce2b4 /spec/models | |
parent | a86bd87afcb8ba8221aa72562a6591139fa763c0 (diff) |
User left project event added
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/event_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 81459233cf6..ee022e959e7 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -50,7 +50,7 @@ describe Event do it { @event.author.should == @user } end - describe "New team mamber" do + describe "Joined project team" do let(:project) {Factory.create :project} let(:new_user) {Factory.create :user} it "should create event" do @@ -60,4 +60,15 @@ describe Event do }.to change{Event.count}.by(1) end end + describe "Left project team" do + let(:project) {Factory.create :project} + let(:new_user) {Factory.create :user} + it "should create event" do + UsersProject.bulk_import(project, [new_user.id], UsersProject::DEVELOPER) + UsersProject.observers.enable :users_project_observer + expect{ + UsersProject.bulk_delete(project, [new_user.id]) + }.to change{Event.count}.by(1) + end + end end |