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
04592971
Commit
04592971
authored
Feb 21, 2022
by
Darby Frey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding entity and routing specs
parent
9ad50117
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
spec/requests/api/ci/secure_files_spec.rb
spec/requests/api/ci/secure_files_spec.rb
+1
-0
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+6
-0
No files found.
spec/requests/api/ci/secure_files_spec.rb
View file @
04592971
...
...
@@ -154,6 +154,7 @@ RSpec.describe API::Ci::SecureFiles do
Digest
::
SHA256
.
hexdigest
(
fixture_file
(
'ci_secure_files/upload-keystore.jks'
))
)
expect
(
json_response
[
'id'
]).
to
eq
(
secure_file
.
id
)
expect
(
Time
.
parse
(
json_response
[
'created_at'
])).
to
be_like_time
(
secure_file
.
created_at
)
end
it
'creates a secure file with read_only permissions by default'
do
...
...
spec/routing/project_routing_spec.rb
View file @
04592971
...
...
@@ -899,6 +899,12 @@ RSpec.describe 'project routing' do
end
end
describe
Projects
::
Ci
::
SecureFilesController
,
'routing'
do
it
'to #show'
do
expect
(
get
(
'/gitlab/gitlabhq/-/ci/secure_files'
)).
to
route_to
(
'projects/ci/secure_files#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
end
end
context
'with a non-existent project'
do
it
'routes to 404 with get request'
do
expect
(
get:
"/gitlab/not_exist"
).
to
route_to
(
...
...
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