Commit 57757944 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Use let_it_be_with_reload to speed up specs

parent 14ba5c4a
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Vulnerabilities::Statistics::AdjustmentService do RSpec.describe Vulnerabilities::Statistics::AdjustmentService do
let_it_be(:project) { create(:project) } let_it_be_with_reload(:project) { create(:project) }
describe '.execute' do describe '.execute' do
let(:project_ids) { [1, 2, 3] } let(:project_ids) { [1, 2, 3] }
...@@ -23,7 +23,6 @@ RSpec.describe Vulnerabilities::Statistics::AdjustmentService do ...@@ -23,7 +23,6 @@ RSpec.describe Vulnerabilities::Statistics::AdjustmentService do
end end
describe '#execute' do describe '#execute' do
let(:project) { create(:project) }
let(:statistics) { project.vulnerability_statistic.reload.as_json(only: expected_statistics.keys) } let(:statistics) { project.vulnerability_statistic.reload.as_json(only: expected_statistics.keys) }
let(:project_ids) { [project.id] } let(:project_ids) { [project.id] }
......
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