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
20efe222
Commit
20efe222
authored
Jan 21, 2022
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace owner with first_owner in feature specs
parent
2f33a8cb
Changes
69
Hide whitespace changes
Inline
Side-by-side
Showing
69 changed files
with
89 additions
and
89 deletions
+89
-89
spec/features/breadcrumbs_schema_markup_spec.rb
spec/features/breadcrumbs_schema_markup_spec.rb
+3
-3
spec/features/contextual_sidebar_spec.rb
spec/features/contextual_sidebar_spec.rb
+1
-1
spec/features/dashboard/snippets_spec.rb
spec/features/dashboard/snippets_spec.rb
+3
-3
spec/features/error_tracking/user_filters_errors_by_status_spec.rb
...ures/error_tracking/user_filters_errors_by_status_spec.rb
+1
-1
spec/features/error_tracking/user_searches_sentry_errors_spec.rb
...atures/error_tracking/user_searches_sentry_errors_spec.rb
+1
-1
spec/features/error_tracking/user_sees_error_details_spec.rb
spec/features/error_tracking/user_sees_error_details_spec.rb
+1
-1
spec/features/error_tracking/user_sees_error_index_spec.rb
spec/features/error_tracking/user_sees_error_index_spec.rb
+2
-2
spec/features/file_uploads/attachment_spec.rb
spec/features/file_uploads/attachment_spec.rb
+1
-1
spec/features/file_uploads/git_lfs_spec.rb
spec/features/file_uploads/git_lfs_spec.rb
+1
-1
spec/features/file_uploads/maven_package_spec.rb
spec/features/file_uploads/maven_package_spec.rb
+1
-1
spec/features/file_uploads/nuget_package_spec.rb
spec/features/file_uploads/nuget_package_spec.rb
+1
-1
spec/features/file_uploads/rubygem_package_spec.rb
spec/features/file_uploads/rubygem_package_spec.rb
+1
-1
spec/features/ide/user_commits_changes_spec.rb
spec/features/ide/user_commits_changes_spec.rb
+1
-1
spec/features/ide/user_opens_merge_request_spec.rb
spec/features/ide/user_opens_merge_request_spec.rb
+1
-1
spec/features/issuables/markdown_references/internal_references_spec.rb
...issuables/markdown_references/internal_references_spec.rb
+2
-2
spec/features/issues/keyboard_shortcut_spec.rb
spec/features/issues/keyboard_shortcut_spec.rb
+2
-2
spec/features/markdown/copy_as_gfm_spec.rb
spec/features/markdown/copy_as_gfm_spec.rb
+1
-1
spec/features/merge_request/user_edits_assignees_sidebar_spec.rb
...atures/merge_request/user_edits_assignees_sidebar_spec.rb
+1
-1
spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb
...erge_request/user_interacts_with_batched_mr_diffs_spec.rb
+1
-1
spec/features/merge_request/user_merges_merge_request_spec.rb
.../features/merge_request/user_merges_merge_request_spec.rb
+1
-1
spec/features/merge_request/user_rebases_merge_request_spec.rb
...features/merge_request/user_rebases_merge_request_spec.rb
+1
-1
spec/features/merge_request/user_reviews_image_spec.rb
spec/features/merge_request/user_reviews_image_spec.rb
+1
-1
spec/features/merge_request/user_sees_diff_spec.rb
spec/features/merge_request/user_sees_diff_spec.rb
+2
-2
spec/features/merge_request/user_views_merge_request_from_deleted_fork_spec.rb
...equest/user_views_merge_request_from_deleted_fork_spec.rb
+1
-1
spec/features/projects/active_tabs_spec.rb
spec/features/projects/active_tabs_spec.rb
+1
-1
spec/features/projects/activity/rss_spec.rb
spec/features/projects/activity/rss_spec.rb
+2
-2
spec/features/projects/blobs/blob_show_spec.rb
spec/features/projects/blobs/blob_show_spec.rb
+1
-1
spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb
...rojects/blobs/user_follows_pipeline_suggest_nudge_spec.rb
+1
-1
spec/features/projects/branches/user_views_branches_spec.rb
spec/features/projects/branches/user_views_branches_spec.rb
+1
-1
spec/features/projects/environments_pod_logs_spec.rb
spec/features/projects/environments_pod_logs_spec.rb
+1
-1
spec/features/projects/files/dockerfile_dropdown_spec.rb
spec/features/projects/files/dockerfile_dropdown_spec.rb
+1
-1
spec/features/projects/files/edit_file_soft_wrap_spec.rb
spec/features/projects/files/edit_file_soft_wrap_spec.rb
+1
-1
spec/features/projects/files/editing_a_file_spec.rb
spec/features/projects/files/editing_a_file_spec.rb
+1
-1
spec/features/projects/files/files_sort_submodules_with_folders_spec.rb
...projects/files/files_sort_submodules_with_folders_spec.rb
+1
-1
spec/features/projects/files/find_file_keyboard_spec.rb
spec/features/projects/files/find_file_keyboard_spec.rb
+1
-1
spec/features/projects/files/gitignore_dropdown_spec.rb
spec/features/projects/files/gitignore_dropdown_spec.rb
+1
-1
spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb
spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb
+1
-1
spec/features/projects/files/project_owner_creates_license_file_spec.rb
...projects/files/project_owner_creates_license_file_spec.rb
+1
-1
spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb
...sees_link_to_create_license_file_in_empty_project_spec.rb
+1
-1
spec/features/projects/files/template_type_dropdown_spec.rb
spec/features/projects/files/template_type_dropdown_spec.rb
+1
-1
spec/features/projects/files/undo_template_spec.rb
spec/features/projects/files/undo_template_spec.rb
+1
-1
spec/features/projects/files/user_browses_a_tree_with_a_folder_containing_only_a_folder_spec.rb
...ses_a_tree_with_a_folder_containing_only_a_folder_spec.rb
+1
-1
spec/features/projects/files/user_browses_files_spec.rb
spec/features/projects/files/user_browses_files_spec.rb
+1
-1
spec/features/projects/files/user_browses_lfs_files_spec.rb
spec/features/projects/files/user_browses_lfs_files_spec.rb
+1
-1
spec/features/projects/files/user_searches_for_files_spec.rb
spec/features/projects/files/user_searches_for_files_spec.rb
+1
-1
spec/features/projects/gfm_autocomplete_load_spec.rb
spec/features/projects/gfm_autocomplete_load_spec.rb
+1
-1
spec/features/projects/issues/design_management/user_uploads_designs_spec.rb
...cts/issues/design_management/user_uploads_designs_spec.rb
+1
-1
spec/features/projects/members/owner_cannot_leave_project_spec.rb
...tures/projects/members/owner_cannot_leave_project_spec.rb
+1
-1
spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb
...embers/owner_cannot_request_access_to_his_project_spec.rb
+1
-1
spec/features/projects/members/user_requests_access_spec.rb
spec/features/projects/members/user_requests_access_spec.rb
+1
-1
spec/features/projects/navbar_spec.rb
spec/features/projects/navbar_spec.rb
+1
-1
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+1
-1
spec/features/projects/settings/monitor_settings_spec.rb
spec/features/projects/settings/monitor_settings_spec.rb
+1
-1
spec/features/projects/settings/packages_settings_spec.rb
spec/features/projects/settings/packages_settings_spec.rb
+1
-1
spec/features/projects/settings/project_settings_spec.rb
spec/features/projects/settings/project_settings_spec.rb
+1
-1
spec/features/projects/settings/user_interacts_with_deploy_keys_spec.rb
...projects/settings/user_interacts_with_deploy_keys_spec.rb
+1
-1
spec/features/projects/show/redirects_spec.rb
spec/features/projects/show/redirects_spec.rb
+1
-1
spec/features/projects/show/user_manages_notifications_spec.rb
...features/projects/show/user_manages_notifications_spec.rb
+1
-1
spec/features/projects/show/user_sees_deletion_failure_message_spec.rb
.../projects/show/user_sees_deletion_failure_message_spec.rb
+1
-1
spec/features/projects/show/user_sees_git_instructions_spec.rb
...features/projects/show/user_sees_git_instructions_spec.rb
+2
-2
spec/features/projects/user_changes_project_visibility_spec.rb
...features/projects/user_changes_project_visibility_spec.rb
+5
-5
spec/features/projects/user_uses_shortcuts_spec.rb
spec/features/projects/user_uses_shortcuts_spec.rb
+1
-1
spec/features/projects/wiki/user_views_wiki_in_project_page_spec.rb
...res/projects/wiki/user_views_wiki_in_project_page_spec.rb
+1
-1
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+4
-4
spec/features/protected_tags_spec.rb
spec/features/protected_tags_spec.rb
+1
-1
spec/features/security/project/snippet/internal_access_spec.rb
...features/security/project/snippet/internal_access_spec.rb
+2
-2
spec/features/security/project/snippet/private_access_spec.rb
.../features/security/project/snippet/private_access_spec.rb
+1
-1
spec/features/security/project/snippet/public_access_spec.rb
spec/features/security/project/snippet/public_access_spec.rb
+3
-3
spec/features/snippets_spec.rb
spec/features/snippets_spec.rb
+1
-1
No files found.
spec/features/breadcrumbs_schema_markup_spec.rb
View file @
20efe222
...
...
@@ -17,7 +17,7 @@ RSpec.describe 'Breadcrumbs schema markup', :aggregate_failures do
expect
(
item_list
.
size
).
to
eq
2
expect
(
item_list
[
0
][
'name'
]).
to
eq
project
.
namespace
.
name
expect
(
item_list
[
0
][
'item'
]).
to
eq
user_url
(
project
.
owner
)
expect
(
item_list
[
0
][
'item'
]).
to
eq
user_url
(
project
.
first_
owner
)
expect
(
item_list
[
1
][
'name'
]).
to
eq
project
.
name
expect
(
item_list
[
1
][
'item'
]).
to
eq
project_url
(
project
)
...
...
@@ -59,7 +59,7 @@ RSpec.describe 'Breadcrumbs schema markup', :aggregate_failures do
expect
(
item_list
.
size
).
to
eq
3
expect
(
item_list
[
0
][
'name'
]).
to
eq
project
.
namespace
.
name
expect
(
item_list
[
0
][
'item'
]).
to
eq
user_url
(
project
.
owner
)
expect
(
item_list
[
0
][
'item'
]).
to
eq
user_url
(
project
.
first_
owner
)
expect
(
item_list
[
1
][
'name'
]).
to
eq
project
.
name
expect
(
item_list
[
1
][
'item'
]).
to
eq
project_url
(
project
)
...
...
@@ -75,7 +75,7 @@ RSpec.describe 'Breadcrumbs schema markup', :aggregate_failures do
expect
(
item_list
.
size
).
to
eq
4
expect
(
item_list
[
0
][
'name'
]).
to
eq
project
.
namespace
.
name
expect
(
item_list
[
0
][
'item'
]).
to
eq
user_url
(
project
.
owner
)
expect
(
item_list
[
0
][
'item'
]).
to
eq
user_url
(
project
.
first_
owner
)
expect
(
item_list
[
1
][
'name'
]).
to
eq
project
.
name
expect
(
item_list
[
1
][
'item'
]).
to
eq
project_url
(
project
)
...
...
spec/features/contextual_sidebar_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Contextual sidebar', :js do
context
'when context is a project'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/dashboard/snippets_spec.rb
View file @
20efe222
...
...
@@ -7,11 +7,11 @@ RSpec.describe 'Dashboard snippets' do
context
'when the project has snippets'
do
let
(
:project
)
{
create
(
:project
,
:public
,
creator:
user
)
}
let!
(
:snippets
)
{
create_list
(
:project_snippet
,
2
,
:public
,
author:
project
.
owner
,
project:
project
)
}
let!
(
:snippets
)
{
create_list
(
:project_snippet
,
2
,
:public
,
author:
project
.
first_
owner
,
project:
project
)
}
before
do
allow
(
Snippet
).
to
receive
(
:default_per_page
).
and_return
(
1
)
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
dashboard_snippets_path
end
...
...
@@ -27,7 +27,7 @@ RSpec.describe 'Dashboard snippets' do
let
(
:project
)
{
create
(
:project
,
:public
,
creator:
user
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
dashboard_snippets_path
end
...
...
spec/features/error_tracking/user_filters_errors_by_status_spec.rb
View file @
20efe222
...
...
@@ -22,7 +22,7 @@ RSpec.describe 'When a user filters Sentry errors by status', :js, :use_clean_ra
end
it
'displays the results'
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_error_tracking_index_path
(
project
)
page
.
within
(
find
(
'.gl-table'
))
do
results
=
page
.
all
(
'.table-row'
)
...
...
spec/features/error_tracking/user_searches_sentry_errors_spec.rb
View file @
20efe222
...
...
@@ -22,7 +22,7 @@ RSpec.describe 'When a user searches for Sentry errors', :js, :use_clean_rails_m
end
it
'displays the results'
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_error_tracking_index_path
(
project
)
page
.
within
(
find
(
'.gl-table'
))
do
...
...
spec/features/error_tracking/user_sees_error_details_spec.rb
View file @
20efe222
...
...
@@ -7,7 +7,7 @@ RSpec.describe 'View error details page', :js, :use_clean_rails_memory_store_cac
context
'with current user as project owner'
do
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
details_project_error_tracking_index_path
(
project
,
issue_id:
issue_id
)
end
...
...
spec/features/error_tracking/user_sees_error_index_spec.rb
View file @
20efe222
...
...
@@ -18,7 +18,7 @@ RSpec.describe 'View error index page', :js, :use_clean_rails_memory_store_cachi
context
'with current user as project owner'
do
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_error_tracking_index_path
(
project
)
end
...
...
@@ -43,7 +43,7 @@ RSpec.describe 'View error index page', :js, :use_clean_rails_memory_store_cachi
context
'with error tracking settings disabled'
do
before
do
project_error_tracking_settings
.
update!
(
enabled:
false
)
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_error_tracking_index_path
(
project
)
end
...
...
spec/features/file_uploads/attachment_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Upload an attachment', :api, :js do
include_context
'file upload requests helpers'
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let_it_be
(
:personal_access_token
)
{
create
(
:personal_access_token
,
user:
user
)
}
let
(
:api_path
)
{
"/projects/
#{
project_id
}
/uploads"
}
...
...
spec/features/file_uploads/git_lfs_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Upload a git lfs object', :js do
include_context
'file upload requests helpers'
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let_it_be
(
:personal_access_token
)
{
create
(
:personal_access_token
,
user:
user
)
}
let
(
:file
)
{
fixture_file_upload
(
'spec/fixtures/banana_sample.gif'
)
}
...
...
spec/features/file_uploads/maven_package_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Upload a maven package', :api, :js do
include_context
'file upload requests helpers'
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let_it_be
(
:personal_access_token
)
{
create
(
:personal_access_token
,
user:
user
)
}
let
(
:project_id
)
{
project
.
id
}
...
...
spec/features/file_uploads/nuget_package_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Upload a nuget package', :api, :js do
include_context
'file upload requests helpers'
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let_it_be
(
:personal_access_token
)
{
create
(
:personal_access_token
,
user:
user
)
}
let
(
:api_path
)
{
"/projects/
#{
project
.
id
}
/packages/nuget/"
}
...
...
spec/features/file_uploads/rubygem_package_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Upload a RubyGems package', :api, :js do
include_context
'file upload requests helpers'
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
let_it_be
(
:personal_access_token
)
{
create
(
:personal_access_token
,
user:
user
)
}
let
(
:api_path
)
{
"/projects/
#{
project_id
}
/packages/rubygems/api/v1/gems"
}
...
...
spec/features/ide/user_commits_changes_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'IDE user commits changes', :js do
include
WebIdeSpecHelpers
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/ide/user_opens_merge_request_spec.rb
View file @
20efe222
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'IDE merge request'
,
:js
do
let
(
:merge_request
)
{
create
(
:merge_request
,
:simple
,
source_project:
project
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/issuables/markdown_references/internal_references_spec.rb
View file @
20efe222
...
...
@@ -5,11 +5,11 @@ require 'spec_helper'
RSpec
.
describe
"Internal references"
,
:js
do
include
Spec
::
Support
::
Helpers
::
Features
::
NotesHelpers
let
(
:private_project_user
)
{
private_project
.
owner
}
let
(
:private_project_user
)
{
private_project
.
first_
owner
}
let
(
:private_project
)
{
create
(
:project
,
:private
,
:repository
)
}
let
(
:private_project_issue
)
{
create
(
:issue
,
project:
private_project
)
}
let
(
:private_project_merge_request
)
{
create
(
:merge_request
,
source_project:
private_project
)
}
let
(
:public_project_user
)
{
public_project
.
owner
}
let
(
:public_project_user
)
{
public_project
.
first_
owner
}
let
(
:public_project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:public_project_issue
)
{
create
(
:issue
,
project:
public_project
)
}
let
(
:public_project_merge_request
)
{
create
(
:merge_request
,
source_project:
public_project
)
}
...
...
spec/features/issues/keyboard_shortcut_spec.rb
View file @
20efe222
...
...
@@ -8,7 +8,7 @@ RSpec.describe 'Issues shortcut', :js do
let
(
:project
)
{
create
(
:project
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_path
(
project
)
end
...
...
@@ -23,7 +23,7 @@ RSpec.describe 'Issues shortcut', :js do
let
(
:project
)
{
create
(
:project
,
:issues_disabled
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_path
(
project
)
end
...
...
spec/features/markdown/copy_as_gfm_spec.rb
View file @
20efe222
...
...
@@ -663,7 +663,7 @@ RSpec.describe 'Copy as GFM', :js do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
context
'from a diff'
do
...
...
spec/features/merge_request/user_edits_assignees_sidebar_spec.rb
View file @
20efe222
...
...
@@ -24,7 +24,7 @@ RSpec.describe 'Merge request > User edits assignees sidebar', :js do
before
do
stub_const
(
'Autocomplete::UsersFinder::LIMIT'
,
users_find_limit
)
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
merge_request
.
assignees
<<
assignee
...
...
spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb
View file @
20efe222
...
...
@@ -10,7 +10,7 @@ RSpec.describe 'Batch diffs', :js do
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
,
source_branch:
'master'
,
target_branch:
'empty-branch'
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
diffs_project_merge_request_path
(
merge_request
.
project
,
merge_request
)
wait_for_requests
...
...
spec/features/merge_request/user_merges_merge_request_spec.rb
View file @
20efe222
...
...
@@ -3,7 +3,7 @@
require
"spec_helper"
RSpec
.
describe
"User merges a merge request"
,
:js
do
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/merge_request/user_rebases_merge_request_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require "spec_helper"
RSpec
.
describe
"User rebases a merge request"
,
:js
do
let
(
:merge_request
)
{
create
(
:merge_request
,
:simple
,
source_project:
project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/merge_request/user_reviews_image_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Merge request > image review', :js do
include
MergeRequestDiffHelpers
include
RepoHelpers
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:merge_request
)
{
create
(
:merge_request_with_diffs
,
:with_image_diffs
,
source_project:
project
,
author:
user
)
}
...
...
spec/features/merge_request/user_sees_diff_spec.rb
View file @
20efe222
...
...
@@ -82,7 +82,7 @@ RSpec.describe 'Merge request > User sees diff', :js do
end
context
'when file contains html'
do
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
let
(
:branch_name
)
{
"test_branch"
}
it
'escapes any HTML special characters in the diff chunk header'
do
...
...
@@ -123,7 +123,7 @@ RSpec.describe 'Merge request > User sees diff', :js do
context
'when file is stored in LFS'
do
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:current_user
)
{
project
.
owner
}
let
(
:current_user
)
{
project
.
first_
owner
}
context
'when LFS is enabled on the project'
do
before
do
...
...
spec/features/merge_request/user_views_merge_request_from_deleted_fork_spec.rb
View file @
20efe222
...
...
@@ -11,7 +11,7 @@ RSpec.describe 'User views merged merge request from deleted fork' do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:source_project
)
{
fork_project
(
project
,
nil
,
repository:
true
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let!
(
:merge_request
)
{
create
(
:merge_request
,
:merged
,
source_project:
source_project
,
target_project:
project
)
}
before
do
...
...
spec/features/projects/active_tabs_spec.rb
View file @
20efe222
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'Project active tab'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/activity/rss_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'Project Activity RSS'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:path
)
{
activity_project_path
(
project
)
}
before
do
...
...
@@ -13,7 +13,7 @@ RSpec.describe 'Project Activity RSS' do
context
'when signed in'
do
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
path
end
...
...
spec/features/projects/blobs/blob_show_spec.rb
View file @
20efe222
...
...
@@ -174,7 +174,7 @@ RSpec.describe 'File blob', :js do
it
'displays no highlighted number of different ref'
do
Files
::
UpdateService
.
new
(
project
,
project
.
owner
,
project
.
first_
owner
,
commit_message:
'Update'
,
start_branch:
'feature'
,
branch_name:
'feature'
,
...
...
spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'User follows pipeline suggest nudge spec when feature is enabled
include
CookieHelper
let
(
:project
)
{
create
(
:project
,
:empty_repo
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
describe
'viewing the new blob page'
do
before
do
...
...
spec/features/projects/branches/user_views_branches_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require "spec_helper"
RSpec
.
describe
"User views branches"
,
:js
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/environments_pod_logs_spec.rb
View file @
20efe222
...
...
@@ -21,7 +21,7 @@ RSpec.describe 'Environment > Pod Logs', :js, :kubeclient do
stub_kubeclient_ingresses
(
environment
.
deployment_namespace
)
stub_kubeclient_nodes_and_nodes_metrics
(
cluster
.
platform
.
api_url
)
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
it
"shows environments in dropdown"
do
...
...
spec/features/projects/files/dockerfile_dropdown_spec.rb
View file @
20efe222
...
...
@@ -7,7 +7,7 @@ RSpec.describe 'Projects > Files > User wants to add a Dockerfile file', :js do
before do
project = create(:project, :repository)
sign_in project.owner
sign_in project.
first_
owner
visit project_new_blob_path(project, 'master', file_name: 'Dockerfile')
end
...
...
spec/features/projects/files/edit_file_soft_wrap_spec.rb
View file @
20efe222
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Files > User uses soft wrap while editing file'
,
:js
do
before
do
project
=
create
(
:project
,
:repository
)
user
=
project
.
owner
user
=
project
.
first_
owner
sign_in
user
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'test_file-name'
)
...
...
spec/features/projects/files/editing_a_file_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Files > User wants to edit a file'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:commit_params
)
do
{
start_branch:
project
.
default_branch
,
...
...
spec/features/projects/files/files_sort_submodules_with_folders_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Files > User views files page'
do
let
(
:project
)
{
create
(
:forked_project_with_submodules
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
user
...
...
spec/features/projects/files/find_file_keyboard_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Files > Find file keyboard shortcuts'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
user
...
...
spec/features/projects/files/gitignore_dropdown_spec.rb
View file @
20efe222
...
...
@@ -7,7 +7,7 @@ RSpec.describe 'Projects > Files > User wants to add a .gitignore file', :js do
before
do
project
=
create
(
:project
,
:repository
)
sign_in
project
.
owner
sign_in
project
.
first_
owner
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'.gitignore'
)
end
...
...
spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb
View file @
20efe222
...
...
@@ -11,7 +11,7 @@ RSpec.describe 'Projects > Files > User wants to add a .gitlab-ci.yml file', :js
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
sign_in
project
.
owner
sign_in
project
.
first_
owner
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
filename
,
**
params
)
end
...
...
spec/features/projects/files/project_owner_creates_license_file_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Files > Project owner creates a license file'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project_maintainer
)
{
project
.
owner
}
let
(
:project_maintainer
)
{
project
.
first_
owner
}
before
do
project
.
repository
.
delete_file
(
project_maintainer
,
'LICENSE'
,
...
...
spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Projects > Files > Project owner sees a link to create a license
include
WebIdeSpecHelpers
let
(
:project
)
{
create
(
:project_empty_repo
)
}
let
(
:project_maintainer
)
{
project
.
owner
}
let
(
:project_maintainer
)
{
project
.
first_
owner
}
before
do
sign_in
(
project_maintainer
)
...
...
spec/features/projects/files/template_type_dropdown_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Files > Template type dropdown selector'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
user
...
...
spec/features/projects/files/undo_template_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Files > Template Undo Button'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
user
...
...
spec/features/projects/files/user_browses_a_tree_with_a_folder_containing_only_a_folder_spec.rb
View file @
20efe222
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
# This is a regression test for https://gitlab.com/gitlab-org/gitlab-foss/issues/37569
RSpec
.
describe
'Projects > Files > User browses a tree with a folder containing only a folder'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:empty_repo
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
project
.
repository
.
create_dir
(
user
,
'foo/bar'
,
branch_name:
'master'
,
message:
'Add the foo/bar folder'
)
...
...
spec/features/projects/files/user_browses_files_spec.rb
View file @
20efe222
...
...
@@ -13,7 +13,7 @@ RSpec.describe "User browses files" do
let
(
:project
)
{
create
(
:project
,
:repository
,
name:
"Shop"
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
"Another Project"
,
path:
"another-project"
)
}
let
(
:tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/files/user_browses_lfs_files_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Files > User browses LFS files'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/files/user_searches_for_files_spec.rb
View file @
20efe222
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
RSpec
.
describe
'Projects > Files > User searches for files'
do
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/gfm_autocomplete_load_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'GFM autocomplete loading', :js do
let
(
:project
)
{
create
(
:project
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_path
(
project
)
end
...
...
spec/features/projects/issues/design_management/user_uploads_designs_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'User uploads new design', :js do
include
DesignManagementTestHelpers
let
(
:project
)
{
create
(
:project_empty_repo
,
:public
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
before
do
...
...
spec/features/projects/members/owner_cannot_leave_project_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Projects > Members > Owner cannot leave project' do
let
(
:project
)
{
create
(
:project
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_path
(
project
)
end
...
...
spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Projects > Members > Owner cannot request access to their own pr
let
(
:project
)
{
create
(
:project
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_path
(
project
)
end
...
...
spec/features/projects/members/user_requests_access_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Projects > Members > User requests access', :js do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:maintainer
)
{
project
.
owner
}
let
(
:maintainer
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/navbar_spec.rb
View file @
20efe222
...
...
@@ -10,7 +10,7 @@ RSpec.describe 'Project navbar' do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/pipelines/pipeline_spec.rb
View file @
20efe222
...
...
@@ -715,7 +715,7 @@ RSpec.describe 'Pipeline', :js do
let
(
:schedule
)
do
create
(
:ci_pipeline_schedule
,
project:
project
,
owner:
project
.
owner
,
owner:
project
.
first_
owner
,
description:
'blocked user schedule'
).
tap
do
|
schedule
|
schedule
.
update_column
(
:next_run_at
,
1
.
minute
.
ago
)
...
...
spec/features/projects/settings/monitor_settings_spec.rb
View file @
20efe222
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Settings > For a forked project'
,
:js
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
,
create_templates: :issue
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/settings/packages_settings_spec.rb
View file @
20efe222
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Settings > Packages'
,
:js
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/settings/project_settings_spec.rb
View file @
20efe222
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects settings'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
let
(
:panel
)
{
find
(
'.general-settings'
,
match: :first
)
}
let
(
:button
)
{
panel
.
find
(
'.btn.gl-button.js-settings-toggle'
)
}
let
(
:title
)
{
panel
.
find
(
'.settings-title'
)
}
...
...
spec/features/projects/settings/user_interacts_with_deploy_keys_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require "spec_helper"
RSpec
.
describe
"User interacts with deploy keys"
,
:js
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/show/redirects_spec.rb
View file @
20efe222
...
...
@@ -47,7 +47,7 @@ RSpec.describe 'Projects > Show > Redirects' do
it
'redirects to private project page after sign in'
do
visit
project_path
(
private_project
)
owner
=
private_project
.
owner
owner
=
private_project
.
first_
owner
fill_in
'user_login'
,
with:
owner
.
email
fill_in
'user_password'
,
with:
owner
.
password
click_button
'Sign in'
...
...
spec/features/projects/show/user_manages_notifications_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Projects > Show > User manages notifications', :js do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
def
click_notifications_button
...
...
spec/features/projects/show/user_sees_deletion_failure_message_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Projects > Show > User sees a deletion failure message' do
let
(
:project
)
{
create
(
:project
,
:empty_repo
,
pending_delete:
true
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
it
'shows error message if deletion for project fails'
do
...
...
spec/features/projects/show/user_sees_git_instructions_spec.rb
View file @
20efe222
...
...
@@ -61,7 +61,7 @@ RSpec.describe 'Projects > Show > User sees Git instructions' do
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_path
(
project
)
end
...
...
@@ -77,7 +77,7 @@ RSpec.describe 'Projects > Show > User sees Git instructions' do
.
at_least
(
:once
)
.
and_return
(
'example_branch'
)
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
project_path
(
project
)
end
...
...
spec/features/projects/user_changes_project_visibility_spec.rb
View file @
20efe222
...
...
@@ -43,9 +43,9 @@ RSpec.describe 'User changes public project visibility', :js do
context
'when the project has forks'
do
before
do
fork_project
(
project
,
project
.
owner
)
fork_project
(
project
,
project
.
first_
owner
)
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
edit_project_path
(
project
)
end
...
...
@@ -84,7 +84,7 @@ RSpec.describe 'User changes public project visibility', :js do
let
(
:project
)
{
create
(
:project
,
:empty_repo
,
:public
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
edit_project_path
(
project
)
end
...
...
@@ -98,9 +98,9 @@ RSpec.describe 'User changes public project visibility', :js do
before
do
stub_feature_flags
(
unlink_fork_network_upon_visibility_decrease:
false
)
fork_project
(
project
,
project
.
owner
)
fork_project
(
project
,
project
.
first_
owner
)
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
edit_project_path
(
project
)
end
...
...
spec/features/projects/user_uses_shortcuts_spec.rb
View file @
20efe222
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'User uses shortcuts'
,
:js
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/projects/wiki/user_views_wiki_in_project_page_spec.rb
View file @
20efe222
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
'Projects > Wiki > User views wiki in project page'
do
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
context
'when repository is disabled for project'
do
...
...
spec/features/projects_spec.rb
View file @
20efe222
...
...
@@ -59,7 +59,7 @@ RSpec.describe 'Project' do
let
(
:path
)
{
project_path
(
project
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
end
it
'parses Markdown'
do
...
...
@@ -123,7 +123,7 @@ RSpec.describe 'Project' do
let
(
:path
)
{
project_path
(
project
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
path
end
...
...
@@ -154,7 +154,7 @@ RSpec.describe 'Project' do
let
(
:path
)
{
project_path
(
project
)
}
before
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
first_
owner
)
visit
path
end
...
...
@@ -201,7 +201,7 @@ RSpec.describe 'Project' do
it
'does not show the name of the deleted project when the source was deleted'
,
:sidekiq_might_not_need_inline
do
forked_project
Projects
::
DestroyService
.
new
(
base_project
,
base_project
.
owner
).
execute
Projects
::
DestroyService
.
new
(
base_project
,
base_project
.
first_
owner
).
execute
visit
project_path
(
forked_project
)
...
...
spec/features/protected_tags_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Protected Tags', :js do
include
ProtectedTagHelpers
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:user
)
{
project
.
first_
owner
}
before
do
sign_in
(
user
)
...
...
spec/features/security/project/snippet/internal_access_spec.rb
View file @
20efe222
...
...
@@ -6,8 +6,8 @@ RSpec.describe "Internal Project Snippets Access" do
include
AccessMatchers
let_it_be
(
:project
)
{
create
(
:project
,
:internal
)
}
let_it_be
(
:internal_snippet
)
{
create
(
:project_snippet
,
:internal
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:private_snippet
)
{
create
(
:project_snippet
,
:private
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:internal_snippet
)
{
create
(
:project_snippet
,
:internal
,
project:
project
,
author:
project
.
first_
owner
)
}
let_it_be
(
:private_snippet
)
{
create
(
:project_snippet
,
:private
,
project:
project
,
author:
project
.
first_
owner
)
}
describe
"GET /:project_path/snippets"
do
subject
{
project_snippets_path
(
project
)
}
...
...
spec/features/security/project/snippet/private_access_spec.rb
View file @
20efe222
...
...
@@ -6,7 +6,7 @@ RSpec.describe "Private Project Snippets Access" do
include
AccessMatchers
let_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
let_it_be
(
:private_snippet
)
{
create
(
:project_snippet
,
:private
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:private_snippet
)
{
create
(
:project_snippet
,
:private
,
project:
project
,
author:
project
.
first_
owner
)
}
describe
"GET /:project_path/snippets"
do
subject
{
project_snippets_path
(
project
)
}
...
...
spec/features/security/project/snippet/public_access_spec.rb
View file @
20efe222
...
...
@@ -6,9 +6,9 @@ RSpec.describe "Public Project Snippets Access" do
include
AccessMatchers
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:public_snippet
)
{
create
(
:project_snippet
,
:public
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:internal_snippet
)
{
create
(
:project_snippet
,
:internal
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:private_snippet
)
{
create
(
:project_snippet
,
:private
,
project:
project
,
author:
project
.
owner
)
}
let_it_be
(
:public_snippet
)
{
create
(
:project_snippet
,
:public
,
project:
project
,
author:
project
.
first_
owner
)
}
let_it_be
(
:internal_snippet
)
{
create
(
:project_snippet
,
:internal
,
project:
project
,
author:
project
.
first_
owner
)
}
let_it_be
(
:private_snippet
)
{
create
(
:project_snippet
,
:private
,
project:
project
,
author:
project
.
first_
owner
)
}
describe
"GET /:project_path/snippets"
do
subject
{
project_snippets_path
(
project
)
}
...
...
spec/features/snippets_spec.rb
View file @
20efe222
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'Snippets'
do
context
'when the project has snippets'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let!
(
:snippets
)
{
create_list
(
:project_snippet
,
2
,
:public
,
author:
project
.
owner
,
project:
project
)
}
let!
(
:snippets
)
{
create_list
(
:project_snippet
,
2
,
:public
,
author:
project
.
first_
owner
,
project:
project
)
}
before
do
allow
(
Snippet
).
to
receive
(
:default_per_page
).
and_return
(
1
)
...
...
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