Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-29 06:07:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-29 06:07:51 +0300
commitd94ed2a46aad78435de66af05c84060ae78c8fc0 (patch)
tree19b057ae567e8bdd10289d290608362f466ca589 /spec
parente56fd471503e00167ca96e7792f75a0d1f3b7891 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/diffs/components/diff_table_cell_spec.js4
-rw-r--r--spec/lib/marginalia_spec.rb3
-rw-r--r--spec/support_specs/helpers/active_record/query_recorder_spec.rb7
3 files changed, 5 insertions, 9 deletions
diff --git a/spec/frontend/diffs/components/diff_table_cell_spec.js b/spec/frontend/diffs/components/diff_table_cell_spec.js
index 1af0746f3bd..ad70b5695cc 100644
--- a/spec/frontend/diffs/components/diff_table_cell_spec.js
+++ b/spec/frontend/diffs/components/diff_table_cell_spec.js
@@ -155,6 +155,10 @@ describe('DiffTableCell', () => {
});
});
+ it('renders the correct line number', () => {
+ expect(findLineNumber().text()).toEqual(TEST_LINE_NUMBER.toString());
+ });
+
it('on click, dispatches setHighlightedRow', () => {
expect(store.dispatch).not.toHaveBeenCalled();
diff --git a/spec/lib/marginalia_spec.rb b/spec/lib/marginalia_spec.rb
index db428bb65c4..d4b84c5cdc4 100644
--- a/spec/lib/marginalia_spec.rb
+++ b/spec/lib/marginalia_spec.rb
@@ -59,7 +59,6 @@ describe 'Marginalia spec' do
"application" => "test",
"controller" => "marginalia_test",
"action" => "first_user",
- "line" => "/spec/support/helpers/query_recorder.rb",
"correlation_id" => correlation_id
}
end
@@ -116,7 +115,6 @@ describe 'Marginalia spec' do
{
"application" => "sidekiq",
"job_class" => "MarginaliaTestJob",
- "line" => "/spec/support/sidekiq_middleware.rb",
"correlation_id" => sidekiq_job['correlation_id'],
"jid" => sidekiq_job['jid']
}
@@ -145,7 +143,6 @@ describe 'Marginalia spec' do
let(:component_map) do
{
"application" => "sidekiq",
- "line" => "/lib/gitlab/i18n.rb",
"jid" => delivery_job.job_id,
"job_class" => delivery_job.arguments.first
}
diff --git a/spec/support_specs/helpers/active_record/query_recorder_spec.rb b/spec/support_specs/helpers/active_record/query_recorder_spec.rb
index 48069c6a766..0827ce37b07 100644
--- a/spec/support_specs/helpers/active_record/query_recorder_spec.rb
+++ b/spec/support_specs/helpers/active_record/query_recorder_spec.rb
@@ -14,9 +14,6 @@ describe ActiveRecord::QueryRecorder do
TestQueries.first
end
- # Test first_only flag works as expected
- expect(control.find_query(/.*query_recorder_spec.rb.*/, 0, first_only: true))
- .to eq(control.find_query(/.*query_recorder_spec.rb.*/, 0).first)
# Check #find_query
expect(control.find_query(/.*/, 0).size)
.to eq(control.data.keys.size)
@@ -32,9 +29,7 @@ describe ActiveRecord::QueryRecorder do
# Ensure memoization value match the raw value above
expect(control.count).to eq(control.log.size)
# Ensure we have only two sources of queries
- expect(control.data.keys.size).to eq(2)
- # Ensure we detect only queries from this file
- expect(control.data.keys.find_all { |i| i.match(/query_recorder_spec.rb/) }.count).to eq(2)
+ expect(control.data.keys.size).to eq(1)
end
end
end