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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e113fc9f
Commit
e113fc9f
authored
Apr 06, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec failures
parent
71312178
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
spec/lib/gitlab/import_export/safe_model_attributes.yml
spec/lib/gitlab/import_export/safe_model_attributes.yml
+1
-0
spec/models/ee/project_spec.rb
spec/models/ee/project_spec.rb
+5
-0
spec/services/ee/notification_service_spec.rb
spec/services/ee/notification_service_spec.rb
+10
-2
No files found.
spec/lib/gitlab/import_export/safe_model_attributes.yml
View file @
e113fc9f
...
...
@@ -23,6 +23,7 @@ Issue:
-
weight
-
time_estimate
-
relative_position
-
service_desk_reply_to
Event
:
-
id
-
target_type
...
...
spec/models/ee/project_spec.rb
View file @
e113fc9f
...
...
@@ -117,6 +117,11 @@ describe Project, models: true do
end
describe
'#regenerate_service_desk_key'
do
before
do
allow_any_instance_of
(
License
).
to
receive
(
:add_on?
).
and_call_original
allow_any_instance_of
(
License
).
to
receive
(
:add_on?
).
with
(
'GitLab_ServiceDesk'
)
{
true
}
end
subject
{
create
(
:project
)
}
it
'leaves it blank by default'
do
...
...
spec/services/ee/notification_service_spec.rb
View file @
e113fc9f
...
...
@@ -3,8 +3,16 @@ require 'spec_helper'
describe
EE
::
NotificationService
do
let
(
:subject
)
{
NotificationService
.
new
}
before
do
allow
(
Notify
).
to
receive
(
:service_desk_new_note_email
)
.
with
(
kind_of
(
Integer
),
kind_of
(
Integer
)).
and_return
(
double
(
deliver_later:
true
))
allow_any_instance_of
(
License
).
to
receive
(
:add_on?
).
and_call_original
allow_any_instance_of
(
License
).
to
receive
(
:add_on?
).
with
(
'GitLab_ServiceDesk'
)
{
true
}
end
def
should_email!
expect
(
Notify
).
to
receive
(
:service_desk_new_note_email
).
with
(
issue
.
id
,
instance
_of
(
Integer
))
expect
(
Notify
).
to
receive
(
:service_desk_new_note_email
).
with
(
issue
.
id
,
kind
_of
(
Integer
))
end
def
should_not_email!
...
...
@@ -55,7 +63,7 @@ describe EE::NotificationService do
context
'when the license doesn\'t allow service desk'
do
before
do
expect
(
Gitlab
::
EE
::
ServiceDesk
).
to
receive
(
:enabled?
).
and_return
(
false
)
expect
(
EE
::
Gitlab
::
ServiceDesk
).
to
receive
(
:enabled?
).
and_return
(
false
)
end
it_should_not_email!
...
...
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