Merge branch 'no_email_on_notification_level_change' into 'master'
Don't send emails on notification level change
This commit is contained in:
commit
14b68586b8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue