Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
cb270777
Commit
cb270777
authored
7 years ago
by
Akihiko Odaki
Committed by
Eugen Rochko
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Cover AboutController more in spec (#3226)
parent
48e7a22e
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/about_controller_spec.rb
+40
-3
40 additions, 3 deletions
spec/controllers/about_controller_spec.rb
with
40 additions
and
3 deletions
spec/controllers/about_controller_spec.rb
+
40
−
3
View file @
cb270777
...
...
@@ -4,23 +4,60 @@ RSpec.describe AboutController, type: :controller do
render_views
describe
'GET #show'
do
it
'returns http success'
do
before
do
get
:show
end
it
'assigns @body_classes'
do
expect
(
assigns
(
:body_classes
)).
to
eq
'about-body'
end
it
'assigns @instance_presenter'
do
expect
(
assigns
(
:instance_presenter
)).
to
be_kind_of
InstancePresenter
end
it
'returns http success'
do
expect
(
response
).
to
have_http_status
(
:success
)
end
end
describe
'GET #more'
do
it
'returns http success'
do
before
do
get
:more
end
it
'assigns @body_classes'
do
expect
(
assigns
(
:body_classes
)).
to
eq
'about-body'
end
it
'assigns @instance_presenter'
do
expect
(
assigns
(
:instance_presenter
)).
to
be_kind_of
InstancePresenter
end
it
'returns http success'
do
expect
(
response
).
to
have_http_status
(
:success
)
end
end
describe
'GET #terms'
do
it
'returns http success'
do
before
do
get
:terms
end
it
'assigns @body_classes'
do
expect
(
assigns
(
:body_classes
)).
to
eq
'about-body'
end
it
'returns http success'
do
expect
(
response
).
to
have_http_status
(
:success
)
end
end
describe
'helper_method :new_user'
do
it
'returns a new User'
do
user
=
@controller
.
view_context
.
new_user
expect
(
user
).
to
be_kind_of
User
expect
(
user
.
account
).
to
be_kind_of
Account
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