Commit a50560e3 authored by Patrick Bajao's avatar Patrick Bajao

Merge branch 'read_resolved_on_default_branch_from_attr_reader' into 'master'

Access `resolved_on_default_branch` via attribute reader

See merge request gitlab-org/gitlab!50381
parents ef36f93d 3c79f7c2
......@@ -152,7 +152,7 @@ RSpec.describe Security::StoreReportService, '#execute' do
let!(:existing_vulnerability) { create(:vulnerability, report_type: report_type, project: project) }
it 'marks the vulnerability as resolved on default branch' do
expect { subject }.to change { existing_vulnerability.reload[:resolved_on_default_branch] }.from(false).to(true)
expect { subject }.to change { existing_vulnerability.reload.resolved_on_default_branch }.from(false).to(true)
end
end
......@@ -162,7 +162,7 @@ RSpec.describe Security::StoreReportService, '#execute' do
end
it 'marks the vulnerability as not resolved on default branch' do
expect { subject }.to change { vulnerability.reload[:resolved_on_default_branch] }.from(true).to(false)
expect { subject }.to change { vulnerability.reload.resolved_on_default_branch }.from(true).to(false)
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