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
2b66d57d
Commit
2b66d57d
authored
Jan 28, 2021
by
Allison Browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete extra `using` references
Only mention `using RSpec::Parameterized::TableSyntax` once per file.
parent
3de8d8b0
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
14 additions
and
101 deletions
+14
-101
ee/spec/controllers/ee/groups_controller_spec.rb
ee/spec/controllers/ee/groups_controller_spec.rb
+1
-6
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+0
-4
spec/lib/gitlab/access/branch_protection_spec.rb
spec/lib/gitlab/access/branch_protection_spec.rb
+2
-8
spec/lib/gitlab/ci/config/entry/cache_spec.rb
spec/lib/gitlab/ci/config/entry/cache_spec.rb
+2
-8
spec/lib/gitlab/search_results_spec.rb
spec/lib/gitlab/search_results_spec.rb
+1
-6
spec/lib/gitlab/utils_spec.rb
spec/lib/gitlab/utils_spec.rb
+0
-8
spec/models/concerns/issuable_spec.rb
spec/models/concerns/issuable_spec.rb
+1
-10
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+0
-6
spec/models/project_spec.rb
spec/models/project_spec.rb
+0
-9
spec/models/prometheus_metric_spec.rb
spec/models/prometheus_metric_spec.rb
+2
-8
spec/requests/api/generic_packages_spec.rb
spec/requests/api/generic_packages_spec.rb
+1
-10
spec/requests/api/pypi_packages_spec.rb
spec/requests/api/pypi_packages_spec.rb
+1
-8
spec/services/projects/prometheus/alerts/notify_service_spec.rb
...ervices/projects/prometheus/alerts/notify_service_spec.rb
+1
-6
spec/services/users/build_service_spec.rb
spec/services/users/build_service_spec.rb
+2
-4
No files found.
ee/spec/controllers/ee/groups_controller_spec.rb
View file @
2b66d57d
...
...
@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec
.
describe
GroupsController
do
include
ExternalAuthorizationServiceHelpers
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
,
:public
)
}
...
...
@@ -277,8 +278,6 @@ RSpec.describe GroupsController do
end
context
'when creating a group with `default_branch_protection` attribute'
do
using
RSpec
::
Parameterized
::
TableSyntax
subject
do
post
:create
,
params:
{
group:
group_params
.
merge
(
default_branch_protection:
Gitlab
::
Access
::
PROTECTION_NONE
)
}
end
...
...
@@ -456,8 +455,6 @@ RSpec.describe GroupsController do
end
context
'when `default_branch_protection` is specified'
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:params
)
do
{
id:
group
.
to_param
,
group:
{
default_branch_protection:
Gitlab
::
Access
::
PROTECTION_NONE
}
}
end
...
...
@@ -555,8 +552,6 @@ RSpec.describe GroupsController do
end
context
'when `prevent_forking_outside_group` is specified'
do
using
RSpec
::
Parameterized
::
TableSyntax
subject
{
put
:update
,
params:
params
}
shared_examples_for
'updates the attribute if needed'
do
...
...
ee/spec/models/project_spec.rb
View file @
2b66d57d
...
...
@@ -2257,8 +2257,6 @@ RSpec.describe Project do
end
describe
'#repository_size_excess'
do
using
RSpec
::
Parameterized
::
TableSyntax
subject
{
project
.
repository_size_excess
}
let_it_be
(
:statistics
)
{
create
(
:project_statistics
)
}
...
...
@@ -2491,8 +2489,6 @@ RSpec.describe Project do
end
describe
'#adjourned_deletion?'
do
using
RSpec
::
Parameterized
::
TableSyntax
subject
{
project
.
adjourned_deletion?
}
where
(
:licensed?
,
:feature_enabled_on_group?
,
:adjourned_period
,
:result
)
do
...
...
spec/lib/gitlab/access/branch_protection_spec.rb
View file @
2b66d57d
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Access
::
BranchProtection
do
describe
'#any?'
do
using
RSpec
::
Parameterized
::
TableSyntax
using
RSpec
::
Parameterized
::
TableSyntax
describe
'#any?'
do
where
(
:level
,
:result
)
do
Gitlab
::
Access
::
PROTECTION_NONE
|
false
Gitlab
::
Access
::
PROTECTION_DEV_CAN_PUSH
|
true
...
...
@@ -19,8 +19,6 @@ RSpec.describe Gitlab::Access::BranchProtection do
end
describe
'#developer_can_push?'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:level
,
:result
)
do
Gitlab
::
Access
::
PROTECTION_NONE
|
false
Gitlab
::
Access
::
PROTECTION_DEV_CAN_PUSH
|
true
...
...
@@ -36,8 +34,6 @@ RSpec.describe Gitlab::Access::BranchProtection do
end
describe
'#developer_can_merge?'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:level
,
:result
)
do
Gitlab
::
Access
::
PROTECTION_NONE
|
false
Gitlab
::
Access
::
PROTECTION_DEV_CAN_PUSH
|
false
...
...
@@ -53,8 +49,6 @@ RSpec.describe Gitlab::Access::BranchProtection do
end
describe
'#fully_protected?'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:level
,
:result
)
do
Gitlab
::
Access
::
PROTECTION_NONE
|
false
Gitlab
::
Access
::
PROTECTION_DEV_CAN_PUSH
|
false
...
...
spec/lib/gitlab/ci/config/entry/cache_spec.rb
View file @
2b66d57d
...
...
@@ -3,6 +3,8 @@
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Ci
::
Config
::
Entry
::
Cache
do
using
RSpec
::
Parameterized
::
TableSyntax
subject
(
:entry
)
{
described_class
.
new
(
config
)
}
describe
'validations'
do
...
...
@@ -56,8 +58,6 @@ RSpec.describe Gitlab::Ci::Config::Entry::Cache do
end
context
'with `policy`'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:policy
,
:result
)
do
'pull-push'
|
'pull-push'
'push'
|
'push'
...
...
@@ -77,8 +77,6 @@ RSpec.describe Gitlab::Ci::Config::Entry::Cache do
end
context
'with `when`'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:when_config
,
:result
)
do
'on_success'
|
'on_success'
'on_failure'
|
'on_failure'
...
...
@@ -109,8 +107,6 @@ RSpec.describe Gitlab::Ci::Config::Entry::Cache do
end
context
'with `policy`'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:policy
,
:valid
)
do
'pull-push'
|
true
'push'
|
true
...
...
@@ -126,8 +122,6 @@ RSpec.describe Gitlab::Ci::Config::Entry::Cache do
end
context
'with `when`'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:when_config
,
:valid
)
do
'on_success'
|
true
'on_failure'
|
true
...
...
spec/lib/gitlab/search_results_spec.rb
View file @
2b66d57d
...
...
@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec
.
describe
Gitlab
::
SearchResults
do
include
ProjectForksHelper
include
SearchHelpers
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
name:
'foo'
)
}
...
...
@@ -41,8 +42,6 @@ RSpec.describe Gitlab::SearchResults do
end
describe
'#formatted_count'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:scope
,
:count_method
,
:expected
)
do
'projects'
|
:limited_projects_count
|
max_limited_count
'issues'
|
:limited_issues_count
|
max_limited_count
...
...
@@ -61,8 +60,6 @@ RSpec.describe Gitlab::SearchResults do
end
describe
'#highlight_map'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:scope
,
:expected
)
do
'projects'
|
{}
'issues'
|
{}
...
...
@@ -80,8 +77,6 @@ RSpec.describe Gitlab::SearchResults do
end
describe
'#formatted_limited_count'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:count
,
:expected
)
do
23
|
'23'
99
|
'99'
...
...
spec/lib/gitlab/utils_spec.rb
View file @
2b66d57d
...
...
@@ -116,8 +116,6 @@ RSpec.describe Gitlab::Utils do
end
describe
'.ms_to_round_sec'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:original
,
:expected
)
do
1999.8999
|
1.9999
12384
|
12.384
...
...
@@ -169,8 +167,6 @@ RSpec.describe Gitlab::Utils do
end
describe
'.remove_line_breaks'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:original
,
:expected
)
do
"foo
\n
bar
\n
baz"
|
"foobarbaz"
"foo
\r\n
bar
\r\n
baz"
|
"foobarbaz"
...
...
@@ -281,8 +277,6 @@ RSpec.describe Gitlab::Utils do
end
describe
'.append_path'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:host
,
:path
,
:result
)
do
'http://test/'
|
'/foo/bar'
|
'http://test/foo/bar'
'http://test/'
|
'//foo/bar'
|
'http://test/foo/bar'
...
...
@@ -393,8 +387,6 @@ RSpec.describe Gitlab::Utils do
end
describe
".safe_downcase!"
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:str
,
:result
)
do
"test"
.
freeze
|
"test"
"Test"
.
freeze
|
"test"
...
...
spec/models/concerns/issuable_spec.rb
View file @
2b66d57d
...
...
@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Issuable
do
include
ProjectForksHelper
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:issuable_class
)
{
Issue
}
let
(
:issue
)
{
create
(
:issue
,
title:
'An issue'
,
description:
'A description'
)
}
...
...
@@ -820,8 +821,6 @@ RSpec.describe Issuable do
end
describe
'#supports_time_tracking?'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:issuable_type
,
:supports_time_tracking
)
do
:issue
|
true
:incident
|
true
...
...
@@ -838,8 +837,6 @@ RSpec.describe Issuable do
end
describe
'#supports_severity?'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:issuable_type
,
:supports_severity
)
do
:issue
|
false
:incident
|
true
...
...
@@ -856,8 +853,6 @@ RSpec.describe Issuable do
end
describe
'#incident?'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:issuable_type
,
:incident
)
do
:issue
|
false
:incident
|
true
...
...
@@ -874,8 +869,6 @@ RSpec.describe Issuable do
end
describe
'#supports_issue_type?'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:issuable_type
,
:supports_issue_type
)
do
:issue
|
true
:merge_request
|
false
...
...
@@ -894,8 +887,6 @@ RSpec.describe Issuable do
subject
{
issuable
.
severity
}
context
'when issuable is not an incident'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:issuable_type
,
:severity
)
do
:issue
|
'unknown'
:merge_request
|
'unknown'
...
...
spec/models/merge_request_spec.rb
View file @
2b66d57d
...
...
@@ -271,8 +271,6 @@ RSpec.describe MergeRequest, factory_default: :keep do
stub_feature_flags
(
stricter_mr_branch_name:
false
)
end
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:branch_name
,
:valid
)
do
'foo'
|
true
'foo:bar'
|
false
...
...
@@ -2778,8 +2776,6 @@ RSpec.describe MergeRequest, factory_default: :keep do
end
context
'with skip_ci_check option'
do
using
RSpec
::
Parameterized
::
TableSyntax
before
do
allow
(
subject
).
to
receive_messages
(
check_mergeability:
nil
,
can_be_merged?:
true
,
...
...
@@ -2803,8 +2799,6 @@ RSpec.describe MergeRequest, factory_default: :keep do
end
context
'with skip_discussions_check option'
do
using
RSpec
::
Parameterized
::
TableSyntax
before
do
allow
(
subject
).
to
receive_messages
(
mergeable_ci_state?:
true
,
check_mergeability:
nil
,
...
...
spec/models/project_spec.rb
View file @
2b66d57d
...
...
@@ -2247,8 +2247,6 @@ RSpec.describe Project, factory_default: :keep do
end
describe
'#ci_config_path='
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:project
)
{
build_stubbed
(
:project
)
}
where
(
:default_ci_config_path
,
:project_ci_config_path
,
:expected_ci_config_path
)
do
...
...
@@ -3947,7 +3945,6 @@ RSpec.describe Project, factory_default: :keep do
describe
'.filter_by_feature_visibility'
do
include_context
'ProjectPolicyTable context'
include
ProjectHelpers
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:group
)
{
create
(
:group
)
}
let!
(
:project
)
{
create
(
:project
,
project_level
,
namespace:
group
)
}
...
...
@@ -4197,8 +4194,6 @@ RSpec.describe Project, factory_default: :keep do
end
describe
'#git_transfer_in_progress?'
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:project
)
{
build
(
:project
)
}
subject
{
project
.
git_transfer_in_progress?
}
...
...
@@ -5822,8 +5817,6 @@ RSpec.describe Project, factory_default: :keep do
end
describe
'validation #changing_shared_runners_enabled_is_allowed'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:shared_runners_setting
,
:project_shared_runners_enabled
,
:valid_record
)
do
'enabled'
|
true
|
true
'enabled'
|
false
|
true
...
...
@@ -6046,8 +6039,6 @@ RSpec.describe Project, factory_default: :keep do
end
describe
'#closest_setting'
do
using
RSpec
::
Parameterized
::
TableSyntax
shared_examples_for
'fetching closest setting'
do
let!
(
:namespace
)
{
create
(
:namespace
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
...
...
spec/models/prometheus_metric_spec.rb
View file @
2b66d57d
...
...
@@ -3,6 +3,8 @@
require
'spec_helper'
RSpec
.
describe
PrometheusMetric
do
using
RSpec
::
Parameterized
::
TableSyntax
subject
{
build
(
:prometheus_metric
)
}
it_behaves_like
'having unique enum values'
...
...
@@ -14,8 +16,6 @@ RSpec.describe PrometheusMetric do
it
{
is_expected
.
to
validate_uniqueness_of
(
:identifier
).
scoped_to
(
:project_id
).
allow_nil
}
describe
'common metrics'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:common
,
:with_project
,
:result
)
do
false
|
true
|
true
false
|
false
|
false
...
...
@@ -34,8 +34,6 @@ RSpec.describe PrometheusMetric do
end
describe
'#query_series'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:legend
,
:type
)
do
'Some other legend'
|
NilClass
'Status Code'
|
Array
...
...
@@ -72,8 +70,6 @@ RSpec.describe PrometheusMetric do
end
describe
'#priority'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:group
,
:priority
)
do
:nginx_ingress_vts
|
10
:nginx_ingress
|
10
...
...
@@ -97,8 +93,6 @@ RSpec.describe PrometheusMetric do
end
describe
'#required_metrics'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:group
,
:required_metrics
)
do
:nginx_ingress_vts
|
%w(nginx_upstream_responses_total nginx_upstream_response_msecs_avg)
:nginx_ingress
|
%w(nginx_ingress_controller_requests nginx_ingress_controller_ingress_upstream_latency_seconds_sum)
...
...
spec/requests/api/generic_packages_spec.rb
View file @
2b66d57d
...
...
@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec
.
describe
API
::
GenericPackages
do
include
HttpBasicAuthHelpers
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:personal_access_token
)
{
create
(
:personal_access_token
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
)
}
...
...
@@ -76,8 +77,6 @@ RSpec.describe API::GenericPackages do
describe
'PUT /api/v4/projects/:id/packages/generic/:package_name/:package_version/:file_name/authorize'
do
context
'with valid project'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:project_visibility
,
:user_role
,
:member?
,
:authenticate_with
,
:expected_status
)
do
'PUBLIC'
|
:developer
|
true
|
:personal_access_token
|
:success
'PUBLIC'
|
:guest
|
true
|
:personal_access_token
|
:forbidden
...
...
@@ -194,8 +193,6 @@ RSpec.describe API::GenericPackages do
let
(
:params
)
{
{
file:
file_upload
}
}
context
'authentication'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:project_visibility
,
:user_role
,
:member?
,
:authenticate_with
,
:expected_status
)
do
'PUBLIC'
|
:guest
|
true
|
:personal_access_token
|
:forbidden
'PUBLIC'
|
:guest
|
true
|
:user_basic_auth
|
:forbidden
...
...
@@ -373,8 +370,6 @@ RSpec.describe API::GenericPackages do
end
context
'application security'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:param_name
,
:param_value
)
do
:package_name
|
'my-package/../'
:package_name
|
'my-package%2f%2e%2e%2f'
...
...
@@ -404,8 +399,6 @@ RSpec.describe API::GenericPackages do
end
describe
'GET /api/v4/projects/:id/packages/generic/:package_name/:package_version/:file_name'
do
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:package
)
{
create
(
:generic_package
,
project:
project
)
}
let_it_be
(
:package_file
)
{
create
(
:package_file
,
:generic
,
package:
package
)
}
...
...
@@ -527,8 +520,6 @@ RSpec.describe API::GenericPackages do
end
context
'application security'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:param_name
,
:param_value
)
do
:package_name
|
'my-package/../'
:package_name
|
'my-package%2f%2e%2e%2f'
...
...
spec/requests/api/pypi_packages_spec.rb
View file @
2b66d57d
...
...
@@ -5,6 +5,7 @@ RSpec.describe API::PypiPackages do
include
WorkhorseHelpers
include
PackagesManagerApiSpecHelpers
include
HttpBasicAuthHelpers
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
:public
)
}
...
...
@@ -20,8 +21,6 @@ RSpec.describe API::PypiPackages do
subject
{
get
api
(
url
)
}
context
'with valid project'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:project_visibility_level
,
:user_role
,
:member
,
:user_token
,
:shared_examples_name
,
:expected_status
)
do
'PUBLIC'
|
:developer
|
true
|
true
|
'PyPI package versions'
|
:success
'PUBLIC'
|
:guest
|
true
|
true
|
'PyPI package versions'
|
:success
...
...
@@ -83,8 +82,6 @@ RSpec.describe API::PypiPackages do
subject
{
post
api
(
url
),
headers:
headers
}
context
'with valid project'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:project_visibility_level
,
:user_role
,
:member
,
:user_token
,
:shared_examples_name
,
:expected_status
)
do
'PUBLIC'
|
:developer
|
true
|
true
|
'process PyPI api request'
|
:success
'PUBLIC'
|
:guest
|
true
|
true
|
'process PyPI api request'
|
:forbidden
...
...
@@ -149,8 +146,6 @@ RSpec.describe API::PypiPackages do
end
context
'with valid project'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:project_visibility_level
,
:user_role
,
:member
,
:user_token
,
:shared_examples_name
,
:expected_status
)
do
'PUBLIC'
|
:developer
|
true
|
true
|
'PyPI package creation'
|
:created
'PUBLIC'
|
:guest
|
true
|
true
|
'process PyPI api request'
|
:forbidden
...
...
@@ -239,8 +234,6 @@ RSpec.describe API::PypiPackages do
subject
{
get
api
(
url
)
}
context
'with valid project'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:project_visibility_level
,
:user_role
,
:member
,
:user_token
,
:shared_examples_name
,
:expected_status
)
do
'PUBLIC'
|
:developer
|
true
|
true
|
'PyPI package download'
|
:success
'PUBLIC'
|
:guest
|
true
|
true
|
'PyPI package download'
|
:success
...
...
spec/services/projects/prometheus/alerts/notify_service_spec.rb
View file @
2b66d57d
...
...
@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Projects
::
Prometheus
::
Alerts
::
NotifyService
do
include
PrometheusHelpers
using
RSpec
::
Parameterized
::
TableSyntax
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
)
}
...
...
@@ -61,8 +62,6 @@ RSpec.describe Projects::Prometheus::Alerts::NotifyService do
end
context
'with project specific cluster'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:cluster_enabled
,
:status
,
:configured_token
,
:token_input
,
:result
)
do
true
|
:installed
|
token
|
token
|
:success
true
|
:installed
|
nil
|
nil
|
:success
...
...
@@ -104,8 +103,6 @@ RSpec.describe Projects::Prometheus::Alerts::NotifyService do
end
context
'with manual prometheus installation'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:alerting_setting
,
:configured_token
,
:token_input
,
:result
)
do
true
|
token
|
token
|
:success
true
|
token
|
'x'
|
:failure
...
...
@@ -139,8 +136,6 @@ RSpec.describe Projects::Prometheus::Alerts::NotifyService do
end
context
'with HTTP integration'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:active
,
:token
,
:result
)
do
:active
|
:valid
|
:success
:active
|
:invalid
|
:failure
...
...
spec/services/users/build_service_spec.rb
View file @
2b66d57d
...
...
@@ -3,6 +3,8 @@
require
'spec_helper'
RSpec
.
describe
Users
::
BuildService
do
using
RSpec
::
Parameterized
::
TableSyntax
describe
'#execute'
do
let
(
:params
)
{
build_stubbed
(
:user
).
slice
(
:first_name
,
:last_name
,
:username
,
:email
,
:password
)
}
...
...
@@ -72,8 +74,6 @@ RSpec.describe Users::BuildService do
end
context
'with "user_default_external" application setting'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:user_default_external
,
:external
,
:email
,
:user_default_internal_regex
,
:result
)
do
true
|
nil
|
'fl@example.com'
|
nil
|
true
true
|
true
|
'fl@example.com'
|
nil
|
true
...
...
@@ -192,8 +192,6 @@ RSpec.describe Users::BuildService do
end
context
'with "user_default_external" application setting'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:user_default_external
,
:external
,
:email
,
:user_default_internal_regex
,
:result
)
do
true
|
nil
|
'fl@example.com'
|
nil
|
true
true
|
true
|
'fl@example.com'
|
nil
|
true
...
...
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