Commit 231a9f5b authored by Timothy Andrew's avatar Timothy Andrew

Fix rubocop spec.

And `scss_lint`
parent 71d4bf72
......@@ -62,7 +62,7 @@
font-weight: 600;
}
&:text {
color: #8C8C8C;
color: #8c8c8c;
}
}
}
......@@ -103,7 +103,7 @@
}
p {
color: #8C8C8C;
color: #8c8c8c;
margin-bottom: $gl-padding;
}
}
......
......@@ -43,7 +43,6 @@ class Deployment < ActiveRecord::Base
project.repository.is_ancestor?(commit.id, sha)
end
def update_merge_request_metrics
if environment.update_merge_request_metrics?
merge_requests = project.merge_requests.
......
......@@ -27,12 +27,11 @@ module Gitlab
from(arel_table.project(Arel.sql('*')).order(arel_table[column_sym]).as(arel_table.table_name)).
project(average([arel_table[column_sym]], 'median')).
where(Arel::Nodes::Between.new(
Arel.sql("(select @row_id := @row_id + 1)"),
Arel::Nodes::And.new(
[Arel.sql('@ct/2.0'),
Arel.sql('@ct/2.0 + 1')]
)
)).
Arel.sql("(select @row_id := @row_id + 1)"),
Arel::Nodes::And.new(
[Arel.sql('@ct/2.0'),
Arel.sql('@ct/2.0 + 1')]
))).
# Disallow negative values
where(arel_table[column_sym].gteq(0))
......
......@@ -7,8 +7,12 @@ describe 'CycleAnalytics#plan', feature: true do
subject { CycleAnalytics.new(project, from: from_date) }
generate_cycle_analytics_spec(phase: :plan,
data_fn: -> (context) { { issue: context.create(:issue, project: context.project),
branch_name: context.random_git_name } },
data_fn: -> (context) do
{
issue: context.create(:issue, project: context.project),
branch_name: context.random_git_name
}
end,
start_time_conditions: [["issue associated with a milestone", -> (context, data) { data[:issue].update(milestone: context.create(:milestone, project: context.project)) }],
["list label added to issue", -> (context, data) { data[:issue].update(label_ids: [context.create(:label, lists: [context.create(:list)]).id]) }]],
end_time_conditions: [["issue mentioned in a commit", -> (context, data) { context.create_commit_referencing_issue(data[:issue], branch_name: data[:branch_name]) }]],
......
......@@ -276,7 +276,6 @@ describe MergeRequests::UpdateService, services: true do
expect(merge_request.reload.issues_closed).to match_array([first_issue, second_issue])
end
end
it 'removes `MergeRequestsClosingIssues` records when issues are not closed anymore' do
opts = {
......@@ -297,5 +296,6 @@ describe MergeRequests::UpdateService, services: true do
expect(merge_request.reload.issues_closed).to be_empty
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment