Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mastofe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Pleroma
mastofe
Commits
bd4dd4c4
Commit
bd4dd4c4
authored
7 years ago
by
Akihiko Odaki
Committed by
Eugen Rochko
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Cover Settings::ExportsController more (#3358)
parent
7d33b60f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec/controllers/settings/exports_controller_spec.rb
+21
-7
21 additions, 7 deletions
spec/controllers/settings/exports_controller_spec.rb
with
21 additions
and
7 deletions
spec/controllers/settings/exports_controller_spec.rb
+
21
−
7
View file @
bd4dd4c4
...
...
@@ -3,15 +3,29 @@ require 'rails_helper'
describe
Settings
::
ExportsController
do
render_views
before
do
sign_in
Fabricate
(
:user
),
scope: :user
end
describe
'GET #show'
do
it
'returns http success'
do
get
:show
context
'when signed in'
do
let
(
:user
)
{
Fabricate
(
:user
)
}
before
do
sign_in
user
,
scope: :user
end
it
'renders export'
do
get
:show
export
=
assigns
(
:export
)
expect
(
export
).
to
be_instance_of
Export
expect
(
export
.
account
).
to
eq
user
.
account
expect
(
response
).
to
have_http_status
(
:success
)
end
end
expect
(
response
).
to
have_http_status
(
:success
)
context
'when not signed in'
do
it
'redirects'
do
get
:show
expect
(
response
).
to
redirect_to
'/auth/sign_in'
end
end
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment