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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
0f627f1c
Commit
0f627f1c
authored
Jun 17, 2015
by
Robert Speicher
Committed by
Dmitriy Zaporozhets
Jun 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `raise_error` without an argument deprecation warnings
parent
8b1f1ab3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
16 deletions
+16
-16
spec/lib/gitlab/ldap/config_spec.rb
spec/lib/gitlab/ldap/config_spec.rb
+1
-1
spec/lib/gitlab/popen_spec.rb
spec/lib/gitlab/popen_spec.rb
+1
-1
spec/lib/gitlab/satellite/merge_action_spec.rb
spec/lib/gitlab/satellite/merge_action_spec.rb
+2
-2
spec/models/commit_range_spec.rb
spec/models/commit_range_spec.rb
+1
-1
spec/models/hooks/service_hook_spec.rb
spec/models/hooks/service_hook_spec.rb
+1
-1
spec/models/hooks/web_hook_spec.rb
spec/models/hooks/web_hook_spec.rb
+1
-1
spec/requests/api/api_helpers_spec.rb
spec/requests/api/api_helpers_spec.rb
+8
-8
spec/services/archive_repository_service_spec.rb
spec/services/archive_repository_service_spec.rb
+1
-1
No files found.
spec/lib/gitlab/ldap/config_spec.rb
View file @
0f627f1c
...
...
@@ -14,7 +14,7 @@ describe Gitlab::LDAP::Config do
end
it
"raises an error if a unknow provider is used"
do
expect
{
Gitlab
::
LDAP
::
Config
.
new
'unknown'
}.
to
raise_error
expect
{
Gitlab
::
LDAP
::
Config
.
new
'unknown'
}.
to
raise_error
(
RuntimeError
)
end
end
end
spec/lib/gitlab/popen_spec.rb
View file @
0f627f1c
...
...
@@ -28,7 +28,7 @@ describe 'Gitlab::Popen', no_db: true do
context
'unsafe string command'
do
it
'raises an error when it gets called with a string argument'
do
expect
{
@klass
.
new
.
popen
(
'ls'
,
path
)
}.
to
raise_error
expect
{
@klass
.
new
.
popen
(
'ls'
,
path
)
}.
to
raise_error
(
RuntimeError
)
end
end
...
...
spec/lib/gitlab/satellite/merge_action_spec.rb
View file @
0f627f1c
...
...
@@ -27,7 +27,7 @@ describe 'Gitlab::Satellite::MergeAction' do
context
'between branches'
do
it
'should raise exception -- not expected to be used by non forks'
do
expect
{
Gitlab
::
Satellite
::
MergeAction
.
new
(
merge_request
.
author
,
merge_request
).
commits_between
}.
to
raise_error
expect
{
Gitlab
::
Satellite
::
MergeAction
.
new
(
merge_request
.
author
,
merge_request
).
commits_between
}.
to
raise_error
(
RuntimeError
)
end
end
end
...
...
@@ -75,7 +75,7 @@ describe 'Gitlab::Satellite::MergeAction' do
context
'between branches'
do
it
'should get proper diffs'
do
expect
{
Gitlab
::
Satellite
::
MergeAction
.
new
(
merge_request
.
author
,
merge_request
).
diffs_between_satellite
}.
to
raise_error
expect
{
Gitlab
::
Satellite
::
MergeAction
.
new
(
merge_request
.
author
,
merge_request
).
diffs_between_satellite
}.
to
raise_error
(
RuntimeError
)
end
end
end
...
...
spec/models/commit_range_spec.rb
View file @
0f627f1c
...
...
@@ -14,7 +14,7 @@ describe CommitRange do
let
(
:range2
)
{
described_class
.
new
(
"
#{
sha_from
}
..
#{
sha_to
}
"
)
}
it
'raises ArgumentError when given an invalid range string'
do
expect
{
described_class
.
new
(
"Foo"
)
}.
to
raise_error
expect
{
described_class
.
new
(
"Foo"
)
}.
to
raise_error
(
ArgumentError
)
end
describe
'#to_s'
do
...
...
spec/models/hooks/service_hook_spec.rb
View file @
0f627f1c
...
...
@@ -52,7 +52,7 @@ describe ServiceHook do
expect
{
@service_hook
.
execute
(
@data
)
}.
to
raise_error
}.
to
raise_error
(
RuntimeError
)
end
end
end
spec/models/hooks/web_hook_spec.rb
View file @
0f627f1c
...
...
@@ -73,7 +73,7 @@ describe ProjectHook do
expect
{
@project_hook
.
execute
(
@data
,
'push_hooks'
)
}.
to
raise_error
}.
to
raise_error
(
RuntimeError
)
end
end
end
spec/requests/api/api_helpers_spec.rb
View file @
0f627f1c
...
...
@@ -72,13 +72,13 @@ describe API, api: true do
it
"should throw an error when the current user is not an admin and attempting to sudo"
do
set_env
(
user
,
admin
.
id
)
expect
{
current_user
}.
to
raise_error
expect
{
current_user
}.
to
raise_error
(
Exception
)
set_param
(
user
,
admin
.
id
)
expect
{
current_user
}.
to
raise_error
expect
{
current_user
}.
to
raise_error
(
Exception
)
set_env
(
user
,
admin
.
username
)
expect
{
current_user
}.
to
raise_error
expect
{
current_user
}.
to
raise_error
(
Exception
)
set_param
(
user
,
admin
.
username
)
expect
{
current_user
}.
to
raise_error
expect
{
current_user
}.
to
raise_error
(
Exception
)
end
it
"should throw an error when the user cannot be found for a given id"
do
...
...
@@ -86,10 +86,10 @@ describe API, api: true do
expect
(
user
.
id
).
not_to
eq
(
id
)
expect
(
admin
.
id
).
not_to
eq
(
id
)
set_env
(
admin
,
id
)
expect
{
current_user
}.
to
raise_error
expect
{
current_user
}.
to
raise_error
(
Exception
)
set_param
(
admin
,
id
)
expect
{
current_user
}.
to
raise_error
expect
{
current_user
}.
to
raise_error
(
Exception
)
end
it
"should throw an error when the user cannot be found for a given username"
do
...
...
@@ -97,10 +97,10 @@ describe API, api: true do
expect
(
user
.
username
).
not_to
eq
(
username
)
expect
(
admin
.
username
).
not_to
eq
(
username
)
set_env
(
admin
,
username
)
expect
{
current_user
}.
to
raise_error
expect
{
current_user
}.
to
raise_error
(
Exception
)
set_param
(
admin
,
username
)
expect
{
current_user
}.
to
raise_error
expect
{
current_user
}.
to
raise_error
(
Exception
)
end
it
"should handle sudo's to oneself"
do
...
...
spec/services/archive_repository_service_spec.rb
View file @
0f627f1c
...
...
@@ -19,7 +19,7 @@ describe ArchiveRepositoryService do
it
"raises an error"
do
expect
{
subject
.
execute
(
timeout:
0.0
)
}.
to
raise_error
}.
to
raise_error
(
RuntimeError
)
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