User joined project event added

This commit is contained in:
Alex Denisov 2012-09-09 23:18:28 +03:00
parent a56cec1132
commit a86bd87afc
10 changed files with 78 additions and 3 deletions

View file

@ -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