Merge branch 'no_email_on_notification_level_change' into 'master'

Don't send emails on notification level change
This commit is contained in:
Dmitriy Zaporozhets 2014-04-04 09:30:16 +00:00
commit 14b68586b8
2 changed files with 2 additions and 2 deletions

View File

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

View File

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