Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
14b68586
Commit
14b68586
authored
Apr 04, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'no_email_on_notification_level_change' into 'master'
Don't send emails on notification level change
parents
a3af64b4
eca269f7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/observers/users_project_observer.rb
app/observers/users_project_observer.rb
+1
-1
spec/observers/users_project_observer_spec.rb
spec/observers/users_project_observer_spec.rb
+1
-1
No files found.
app/observers/users_project_observer.rb
View file @
14b68586
...
@@ -10,7 +10,7 @@ class UsersProjectObserver < BaseObserver
...
@@ -10,7 +10,7 @@ class UsersProjectObserver < BaseObserver
end
end
def
after_update
(
users_project
)
def
after_update
(
users_project
)
notification
.
update_team_member
(
users_project
)
notification
.
update_team_member
(
users_project
)
if
users_project
.
project_access_changed?
end
end
def
after_destroy
(
users_project
)
def
after_destroy
(
users_project
)
...
...
spec/observers/users_project_observer_spec.rb
View file @
14b68586
...
@@ -21,7 +21,7 @@ describe UsersProjectObserver do
...
@@ -21,7 +21,7 @@ describe UsersProjectObserver do
it
"should send email to user"
do
it
"should send email to user"
do
subject
.
should_receive
(
:notification
)
subject
.
should_receive
(
:notification
)
@users_project
.
update_attribute
(
:project_access
,
UsersProject
::
MAST
ER
)
@users_project
.
update_attribute
(
:project_access
,
UsersProject
::
OWN
ER
)
end
end
it
"should not called after UsersProject destroyed"
do
it
"should not called after UsersProject destroyed"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment