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
3d7fe150
Commit
3d7fe150
authored
Jan 10, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace set to let_it_be in ee/spec/finders
Contributes to
https://gitlab.com/gitlab-org/gitlab/issues/27922
parent
f1ce70ab
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
41 additions
and
41 deletions
+41
-41
ee/spec/finders/audit_log_finder_spec.rb
ee/spec/finders/audit_log_finder_spec.rb
+3
-3
ee/spec/finders/design_management/versions_finder_spec.rb
ee/spec/finders/design_management/versions_finder_spec.rb
+5
-5
ee/spec/finders/geo/project_registry_status_finder_spec.rb
ee/spec/finders/geo/project_registry_status_finder_spec.rb
+10
-10
ee/spec/finders/geo/repository_verification_finder_spec.rb
ee/spec/finders/geo/repository_verification_finder_spec.rb
+1
-1
ee/spec/finders/groups_with_templates_finder_spec.rb
ee/spec/finders/groups_with_templates_finder_spec.rb
+9
-9
ee/spec/finders/license_template_finder_spec.rb
ee/spec/finders/license_template_finder_spec.rb
+1
-1
ee/spec/finders/licenses_finder_spec.rb
ee/spec/finders/licenses_finder_spec.rb
+1
-1
ee/spec/finders/packages/group_packages_finder_spec.rb
ee/spec/finders/packages/group_packages_finder_spec.rb
+1
-1
ee/spec/finders/projects/prometheus/alerts_finder_spec.rb
ee/spec/finders/projects/prometheus/alerts_finder_spec.rb
+9
-9
ee/spec/finders/template_finder_spec.rb
ee/spec/finders/template_finder_spec.rb
+1
-1
No files found.
ee/spec/finders/audit_log_finder_spec.rb
View file @
3d7fe150
...
...
@@ -4,9 +4,9 @@ require 'spec_helper'
describe
AuditLogFinder
do
describe
'#execute'
do
set
(
:user_audit_event
)
{
create
(
:user_audit_event
,
created_at:
3
.
days
.
ago
)
}
set
(
:project_audit_event
)
{
create
(
:project_audit_event
,
created_at:
2
.
days
.
ago
)
}
set
(
:group_audit_event
)
{
create
(
:group_audit_event
,
created_at:
1
.
day
.
ago
)
}
let_it_be
(
:user_audit_event
)
{
create
(
:user_audit_event
,
created_at:
3
.
days
.
ago
)
}
let_it_be
(
:project_audit_event
)
{
create
(
:project_audit_event
,
created_at:
2
.
days
.
ago
)
}
let_it_be
(
:group_audit_event
)
{
create
(
:group_audit_event
,
created_at:
1
.
day
.
ago
)
}
subject
{
described_class
.
new
(
params
).
execute
}
...
...
ee/spec/finders/design_management/versions_finder_spec.rb
View file @
3d7fe150
...
...
@@ -5,11 +5,11 @@ require 'spec_helper'
describe
DesignManagement
::
VersionsFinder
do
include
DesignManagementTestHelpers
set
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:private
)
}
set
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
set
(
:design_1
)
{
create
(
:design
,
:with_file
,
issue:
issue
,
versions_count:
1
)
}
set
(
:design_2
)
{
create
(
:design
,
:with_file
,
issue:
issue
,
versions_count:
1
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:design_1
)
{
create
(
:design
,
:with_file
,
issue:
issue
,
versions_count:
1
)
}
let_it_be
(
:design_2
)
{
create
(
:design
,
:with_file
,
issue:
issue
,
versions_count:
1
)
}
let
(
:version_1
)
{
design_1
.
versions
.
first
}
let
(
:version_2
)
{
design_2
.
versions
.
first
}
let
(
:design_or_collection
)
{
issue
.
design_collection
}
...
...
ee/spec/finders/geo/project_registry_status_finder_spec.rb
View file @
3d7fe150
...
...
@@ -4,19 +4,19 @@ require 'spec_helper'
describe
Geo
::
ProjectRegistryStatusFinder
,
:geo
,
:geo_tracking_db
do
include
::
EE
::
GeoHelpers
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
set
(
:synced_registry
)
{
create
(
:geo_project_registry
,
:synced
)
}
set
(
:synced_and_verified_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_verified
)
}
set
(
:sync_pending_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_dirty
)
}
set
(
:sync_failed_registry
)
{
create
(
:geo_project_registry
,
:existing_repository_sync_failed
)
}
let_it_be
(
:synced_registry
)
{
create
(
:geo_project_registry
,
:synced
)
}
let_it_be
(
:synced_and_verified_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_verified
)
}
let_it_be
(
:sync_pending_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_dirty
)
}
let_it_be
(
:sync_failed_registry
)
{
create
(
:geo_project_registry
,
:existing_repository_sync_failed
)
}
set
(
:verify_outdated_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_verification_outdated
)
}
set
(
:verify_failed_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_verification_failed
)
}
set
(
:verify_checksum_mismatch_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_checksum_mismatch
)
}
let_it_be
(
:verify_outdated_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_verification_outdated
)
}
let_it_be
(
:verify_failed_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_verification_failed
)
}
let_it_be
(
:verify_checksum_mismatch_registry
)
{
create
(
:geo_project_registry
,
:synced
,
:repository_checksum_mismatch
)
}
set
(
:never_synced_registry
)
{
create
(
:geo_project_registry
)
}
set
(
:never_synced_registry_with_failure
)
{
create
(
:geo_project_registry
,
:repository_sync_failed
)
}
let_it_be
(
:never_synced_registry
)
{
create
(
:geo_project_registry
)
}
let_it_be
(
:never_synced_registry_with_failure
)
{
create
(
:geo_project_registry
,
:repository_sync_failed
)
}
before
do
stub_current_geo_node
(
secondary
)
...
...
ee/spec/finders/geo/repository_verification_finder_spec.rb
View file @
3d7fe150
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
Geo
::
RepositoryVerificationFinder
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
describe
'#find_failed_repositories'
do
it
'returns projects where next retry attempt is in the past'
do
...
...
ee/spec/finders/groups_with_templates_finder_spec.rb
View file @
3d7fe150
...
...
@@ -3,17 +3,17 @@
require
'spec_helper'
describe
GroupsWithTemplatesFinder
do
set
(
:group_1
)
{
create
(
:group
,
name:
'group-1'
)
}
set
(
:group_2
)
{
create
(
:group
,
name:
'group-2'
)
}
set
(
:group_3
)
{
create
(
:group
,
name:
'group-3'
)
}
set
(
:group_4
)
{
create
(
:group
,
name:
'group-4'
)
}
let_it_be
(
:group_1
,
reload:
true
)
{
create
(
:group
,
name:
'group-1'
)
}
let_it_be
(
:group_2
,
reload:
true
)
{
create
(
:group
,
name:
'group-2'
)
}
let_it_be
(
:group_3
,
reload:
true
)
{
create
(
:group
,
name:
'group-3'
)
}
let_it_be
(
:group_4
,
reload:
true
)
{
create
(
:group
,
name:
'group-4'
)
}
set
(
:subgroup_1
)
{
create
(
:group
,
parent:
group_1
,
name:
'subgroup-1'
)
}
set
(
:subgroup_2
)
{
create
(
:group
,
parent:
group_2
,
name:
'subgroup-2'
)
}
set
(
:subgroup_3
)
{
create
(
:group
,
parent:
group_3
,
name:
'subgroup-3'
)
}
let_it_be
(
:subgroup_1
)
{
create
(
:group
,
parent:
group_1
,
name:
'subgroup-1'
)
}
let_it_be
(
:subgroup_2
)
{
create
(
:group
,
parent:
group_2
,
name:
'subgroup-2'
)
}
let_it_be
(
:subgroup_3
)
{
create
(
:group
,
parent:
group_3
,
name:
'subgroup-3'
)
}
set
(
:subgroup_4
)
{
create
(
:group
,
parent:
group_1
,
name:
'subgroup-4'
)
}
set
(
:subgroup_5
)
{
create
(
:group
,
parent:
subgroup_4
,
name:
'subgroup-5'
)
}
let_it_be
(
:subgroup_4
,
reload:
true
)
{
create
(
:group
,
parent:
group_1
,
name:
'subgroup-4'
)
}
let_it_be
(
:subgroup_5
)
{
create
(
:group
,
parent:
subgroup_4
,
name:
'subgroup-5'
)
}
before
do
group_1
.
update!
(
custom_project_templates_group_id:
subgroup_1
.
id
)
...
...
ee/spec/finders/license_template_finder_spec.rb
View file @
3d7fe150
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
LicenseTemplateFinder
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:params
)
{
{}
}
let
(
:fake_template_source
)
{
double
(
::
Gitlab
::
CustomFileTemplates
)
}
...
...
ee/spec/finders/licenses_finder_spec.rb
View file @
3d7fe150
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
describe
LicensesFinder
do
let
(
:license
)
{
create
(
:license
)
}
set
(
:user
)
{
create
(
:admin
)
}
let_it_be
(
:user
)
{
create
(
:admin
)
}
it
'returns a license by id'
do
expect
(
described_class
.
new
(
user
,
id:
license
.
id
).
execute
.
take
).
to
eq
(
license
)
...
...
ee/spec/finders/packages/group_packages_finder_spec.rb
View file @
3d7fe150
...
...
@@ -75,7 +75,7 @@ describe Packages::GroupPackagesFinder do
end
context
'when project is public'
do
set
(
:other_user
)
{
create
(
:user
)
}
let_it_be
(
:other_user
)
{
create
(
:user
)
}
let
(
:finder
)
{
described_class
.
new
(
other_user
,
group
)
}
before
do
...
...
ee/spec/finders/projects/prometheus/alerts_finder_spec.rb
View file @
3d7fe150
...
...
@@ -7,15 +7,15 @@ describe Projects::Prometheus::AlertsFinder do
let
(
:params
)
{
{}
}
describe
'with params'
do
set
(
:project
)
{
create
(
:project
)
}
set
(
:other_project
)
{
create
(
:project
)
}
set
(
:other_env
)
{
create
(
:environment
,
project:
other_project
)
}
set
(
:production
)
{
create
(
:environment
,
project:
project
)
}
set
(
:staging
)
{
create
(
:environment
,
project:
project
)
}
set
(
:alert
)
{
create_alert
(
project
,
production
)
}
set
(
:alert2
)
{
create_alert
(
project
,
production
)
}
set
(
:stg_alert
)
{
create_alert
(
project
,
staging
)
}
set
(
:other_alert
)
{
create_alert
(
other_project
,
other_env
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:other_project
)
{
create
(
:project
)
}
let_it_be
(
:other_env
)
{
create
(
:environment
,
project:
other_project
)
}
let_it_be
(
:production
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:staging
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:alert
)
{
create_alert
(
project
,
production
)
}
let_it_be
(
:alert2
)
{
create_alert
(
project
,
production
)
}
let_it_be
(
:stg_alert
)
{
create_alert
(
project
,
staging
)
}
let_it_be
(
:other_alert
)
{
create_alert
(
other_project
,
other_env
)
}
describe
'#execute'
do
subject
{
finder
.
execute
}
...
...
ee/spec/finders/template_finder_spec.rb
View file @
3d7fe150
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
describe
TemplateFinder
do
using
RSpec
::
Parameterized
::
TableSyntax
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:params
)
{
{}
}
...
...
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