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
5edf8a85
Commit
5edf8a85
authored
Mar 15, 2017
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds ExportCsvWorker spec
parent
2df84af0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
spec/workers/export_csv_worker_spec.rb
spec/workers/export_csv_worker_spec.rb
+26
-0
No files found.
spec/workers/export_csv_worker_spec.rb
0 → 100644
View file @
5edf8a85
require
'spec_helper'
describe
ExportCsvWorker
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
,
creator:
user
)
}
def
perform
(
params
=
{})
described_class
.
new
.
perform
(
user
.
id
,
project
.
id
,
params
)
end
it
'emails a CSV'
do
expect
{
perform
}.
to
change
(
ActionMailer
::
Base
.
deliveries
,
:size
).
by
(
1
)
end
it
'ensures that project_id is passed to issues_finder'
do
expect
(
IssuesFinder
).
to
receive
(
:new
).
with
(
anything
,
hash_including
(
project_id:
project
.
id
)).
and_call_original
perform
end
it
'converts controller string keys to symbol keys for IssuesFinder'
do
expect
(
IssuesFinder
).
to
receive
(
:new
).
with
(
anything
,
hash_including
(
test_key:
true
)).
and_call_original
perform
(
'test_key'
=>
true
)
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