Commit 14b68586 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'no_email_on_notification_level_change' into 'master'

Don't send emails on notification level change
parents a3af64b4 eca269f7
No related merge requests found
......@@ -10,7 +10,7 @@ class UsersProjectObserver < BaseObserver
end
def after_update(users_project)
notification.update_team_member(users_project)
notification.update_team_member(users_project) if users_project.project_access_changed?
end
def after_destroy(users_project)
......
......@@ -21,7 +21,7 @@ describe UsersProjectObserver do
it "should send email to user" do
subject.should_receive(:notification)
@users_project.update_attribute(:project_access, UsersProject::MASTER)
@users_project.update_attribute(:project_access, UsersProject::OWNER)
end
it "should not called after UsersProject destroyed" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment