Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Qpixel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Answers
Qpixel
Commits
866426f0
Commit
866426f0
authored
Dec 13, 2020
by
ArtOfCode-
Browse files
Options
Downloads
Patches
Plain Diff
Rubocop
parent
24603852
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/controllers/posts_controller_test.rb
+3
-3
3 additions, 3 deletions
test/controllers/posts_controller_test.rb
with
3 additions
and
3 deletions
test/controllers/posts_controller_test.rb
+
3
−
3
View file @
866426f0
...
@@ -186,7 +186,7 @@ class PostsControllerTest < ActionController::TestCase
...
@@ -186,7 +186,7 @@ class PostsControllerTest < ActionController::TestCase
assert_response
200
assert_response
200
assert_not_nil
assigns
(
:post
)
assert_not_nil
assigns
(
:post
)
assert_not_nil
assigns
(
:children
)
assert_not_nil
assigns
(
:children
)
assert_not
assigns
(
:children
).
any?
{
|
c
|
c
.
deleted
}
,
'Anonymous user can see deleted answers'
assert_not
assigns
(
:children
).
any?
(
&
:
deleted
)
,
'Anonymous user can see deleted answers'
end
end
test
'standard user can get show'
do
test
'standard user can get show'
do
...
@@ -195,7 +195,7 @@ class PostsControllerTest < ActionController::TestCase
...
@@ -195,7 +195,7 @@ class PostsControllerTest < ActionController::TestCase
assert_response
200
assert_response
200
assert_not_nil
assigns
(
:post
)
assert_not_nil
assigns
(
:post
)
assert_not_nil
assigns
(
:children
)
assert_not_nil
assigns
(
:children
)
assert_not
assigns
(
:children
).
any?
{
|
c
|
c
.
deleted
}
,
'Anonymous user can see deleted answers'
assert_not
assigns
(
:children
).
any?
(
&
:
deleted
)
,
'Anonymous user can see deleted answers'
end
end
test
'privileged user can see deleted post'
do
test
'privileged user can see deleted post'
do
...
@@ -212,7 +212,7 @@ class PostsControllerTest < ActionController::TestCase
...
@@ -212,7 +212,7 @@ class PostsControllerTest < ActionController::TestCase
assert_response
200
assert_response
200
assert_not_nil
assigns
(
:post
)
assert_not_nil
assigns
(
:post
)
assert_not_nil
assigns
(
:children
)
assert_not_nil
assigns
(
:children
)
assert
assigns
(
:children
).
any?
{
|
c
|
c
.
deleted
}
,
'Privileged user cannot see deleted answers'
assert
assigns
(
:children
).
any?
(
&
:
deleted
)
,
'Privileged user cannot see deleted answers'
end
end
test
'show redirects parented to parent post'
do
test
'show redirects parented to parent post'
do
...
...
...
...
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
sign in
to comment