Commit dc7b0c98 authored by Mikolaj Wawrzyniak's avatar Mikolaj Wawrzyniak Committed by Jose Vargas

Fix failin shared dashbaord examples

::Gitlab::Metrics::Dashboard::Processor call wasn't stubbed
in all shared examples for dashbaord clonning process
which caused them to break with changes made to dashboard yml file
parent 5de40804
......@@ -67,6 +67,7 @@ RSpec.shared_examples 'valid dashboard cloning process' do |dashboard_template,
it 'delegates commit creation to Files::CreateService', :aggregate_failures do
service_instance = instance_double(::Files::CreateService)
allow(::Gitlab::Metrics::Dashboard::Processor).to receive(:new).and_return(double(process: file_content_hash))
expect(::Files::CreateService).to receive(:new).with(project, user, dashboard_attrs).and_return(service_instance)
expect(service_instance).to receive(:execute).and_return(status: :success)
......
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