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
f2e9ef10
Commit
f2e9ef10
authored
Sep 20, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs
parent
faa95ba4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
spec/services/emails/create_service_spec.rb
spec/services/emails/create_service_spec.rb
+1
-1
spec/services/emails/destroy_service_spec.rb
spec/services/emails/destroy_service_spec.rb
+1
-1
spec/services/users/update_service_spec.rb
spec/services/users/update_service_spec.rb
+4
-4
No files found.
spec/services/emails/create_service_spec.rb
View file @
f2e9ef10
...
...
@@ -4,7 +4,7 @@ describe Emails::CreateService do
let
(
:user
)
{
create
(
:user
)
}
let
(
:opts
)
{
{
email:
'new@email.com'
}
}
subject
(
:service
)
{
described_class
.
new
(
user
,
opts
)
}
subject
(
:service
)
{
described_class
.
new
(
user
,
user
,
opts
)
}
describe
'#execute'
do
it
'creates an email with valid attributes'
do
...
...
spec/services/emails/destroy_service_spec.rb
View file @
f2e9ef10
...
...
@@ -4,7 +4,7 @@ describe Emails::DestroyService do
let!
(
:user
)
{
create
(
:user
)
}
let!
(
:email
)
{
create
(
:email
,
user:
user
)
}
subject
(
:service
)
{
described_class
.
new
(
user
,
email:
email
.
email
)
}
subject
(
:service
)
{
described_class
.
new
(
user
,
user
,
email:
email
.
email
)
}
describe
'#execute'
do
it
'removes an email'
do
...
...
spec/services/users/update_service_spec.rb
View file @
f2e9ef10
...
...
@@ -31,13 +31,13 @@ describe Users::UpdateService do
end
def
update_user
(
user
,
opts
)
described_class
.
new
(
user
,
opts
).
execute
described_class
.
new
(
user
,
user
,
opts
).
execute
end
end
describe
'#execute!'
do
it
'updates the name'
do
service
=
described_class
.
new
(
user
,
name:
'New Name'
)
service
=
described_class
.
new
(
user
,
user
,
name:
'New Name'
)
expect
(
service
).
not_to
receive
(
:notify_new_user
)
result
=
service
.
execute!
...
...
@@ -55,7 +55,7 @@ describe Users::UpdateService do
it
'fires system hooks when a new user is saved'
do
system_hook_service
=
spy
(
:system_hook_service
)
user
=
build
(
:user
)
service
=
described_class
.
new
(
user
,
name:
'John Doe'
)
service
=
described_class
.
new
(
user
,
user
,
name:
'John Doe'
)
expect
(
service
).
to
receive
(
:notify_new_user
).
and_call_original
expect
(
service
).
to
receive
(
:system_hook_service
).
and_return
(
system_hook_service
)
...
...
@@ -65,7 +65,7 @@ describe Users::UpdateService do
end
def
update_user
(
user
,
opts
)
described_class
.
new
(
user
,
opts
).
execute!
described_class
.
new
(
user
,
user
,
opts
).
execute!
end
end
end
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