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/observers | |
parent | a56cec113204130385e0fbc3f2223d81101357ef (diff) |
User joined project event added
Diffstat (limited to 'spec/observers')
-rw-r--r-- | spec/observers/users_project_observer_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/observers/users_project_observer_spec.rb b/spec/observers/users_project_observer_spec.rb index 3e3920407cb..99130aa5161 100644 --- a/spec/observers/users_project_observer_spec.rb +++ b/spec/observers/users_project_observer_spec.rb @@ -23,6 +23,14 @@ describe UsersProjectObserver do Notify.should_receive(:project_access_granted_email).with(users_project.id).and_return(double(deliver: true)) subject.after_create(users_project) end + it "should create new event" do + Event.should_receive(:create).with( + project_id: users_project.project.id, + action: Event::Joined, + author_id: users_project.user.id + ) + subject.after_create(users_project) + end end describe "#after_update" do |