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
10cf536c
Commit
10cf536c
authored
Dec 13, 2021
by
Tetiana Chupryna
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '346390-remove-useless-spec' into 'master'
Remove redundant spec See merge request gitlab-org/gitlab!76524
parents
8a7dabc6
6b1b13c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
17 deletions
+5
-17
spec/features/issues/csv_spec.rb
spec/features/issues/csv_spec.rb
+5
-17
No files found.
spec/features/issues/csv_spec.rb
View file @
10cf536c
...
@@ -47,13 +47,13 @@ RSpec.describe 'Issues csv', :js do
...
@@ -47,13 +47,13 @@ RSpec.describe 'Issues csv', :js do
expect
(
page
).
to
have_content
"emailed to
#{
user
.
notification_email_or_default
}
"
expect
(
page
).
to
have_content
"emailed to
#{
user
.
notification_email_or_default
}
"
end
end
it
'includes a csv attachment'
,
:sidekiq_
might_not_need_
inline
do
it
'includes a csv attachment'
,
:sidekiq_inline
do
request_csv
request_csv
expect
(
attachment
.
content_type
).
to
include
(
'text/csv'
)
expect
(
attachment
.
content_type
).
to
include
(
'text/csv'
)
end
end
it
'ignores pagination'
,
:sidekiq_
might_not_need_
inline
do
it
'ignores pagination'
,
:sidekiq_inline
do
create_list
(
:issue
,
30
,
project:
project
,
author:
user
)
create_list
(
:issue
,
30
,
project:
project
,
author:
user
)
request_csv
request_csv
...
@@ -61,13 +61,13 @@ RSpec.describe 'Issues csv', :js do
...
@@ -61,13 +61,13 @@ RSpec.describe 'Issues csv', :js do
expect
(
csv
.
count
).
to
eq
31
expect
(
csv
.
count
).
to
eq
31
end
end
it
'uses filters from issue index'
,
:sidekiq_
might_not_need_
inline
do
it
'uses filters from issue index'
,
:sidekiq_inline
do
request_csv
(
state: :closed
)
request_csv
(
state: :closed
)
expect
(
csv
.
count
).
to
eq
0
expect
(
csv
.
count
).
to
eq
0
end
end
it
'ignores sorting from issue index'
,
:sidekiq_
might_not_need_
inline
do
it
'ignores sorting from issue index'
,
:sidekiq_inline
do
issue2
=
create
(
:labeled_issue
,
project:
project
,
author:
user
,
labels:
[
feature_label
])
issue2
=
create
(
:labeled_issue
,
project:
project
,
author:
user
,
labels:
[
feature_label
])
request_csv
(
sort: :label_priority
)
request_csv
(
sort: :label_priority
)
...
@@ -76,23 +76,11 @@ RSpec.describe 'Issues csv', :js do
...
@@ -76,23 +76,11 @@ RSpec.describe 'Issues csv', :js do
expect
(
csv
.
map
{
|
row
|
row
[
'Issue ID'
]
}).
to
eq
expected
expect
(
csv
.
map
{
|
row
|
row
[
'Issue ID'
]
}).
to
eq
expected
end
end
it
'uses array filters, such as label_name'
,
:sidekiq_
might_not_need_
inline
do
it
'uses array filters, such as label_name'
,
:sidekiq_inline
do
issue
.
update!
(
labels:
[
idea_label
])
issue
.
update!
(
labels:
[
idea_label
])
request_csv
(
"label_name[]"
=>
'Bug'
)
request_csv
(
"label_name[]"
=>
'Bug'
)
expect
(
csv
.
count
).
to
eq
0
expect
(
csv
.
count
).
to
eq
0
end
end
it
'avoids excessive database calls'
do
control_count
=
ActiveRecord
::
QueryRecorder
.
new
{
request_csv
}.
count
create_list
(
:labeled_issue
,
10
,
project:
project
,
assignees:
[
user
],
author:
user
,
milestone:
milestone
,
labels:
[
feature_label
,
idea_label
])
expect
{
request_csv
}.
not_to
exceed_query_limit
(
control_count
+
5
)
end
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