2021-03-05 10:09:12 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe Users::DismissUserCalloutService do
|
|
|
|
describe '#execute' do
|
2021-09-14 20:09:30 -04:00
|
|
|
let_it_be(:user) { create(:user) }
|
2021-03-05 10:09:12 -05:00
|
|
|
|
2021-09-14 20:09:30 -04:00
|
|
|
let(:params) { { feature_name: feature_name } }
|
|
|
|
let(:feature_name) { UserCallout.feature_names.each_key.first }
|
2021-03-05 10:09:12 -05:00
|
|
|
|
2021-09-14 20:09:30 -04:00
|
|
|
subject(:execute) do
|
|
|
|
described_class.new(
|
|
|
|
container: nil, current_user: user, params: params
|
|
|
|
).execute
|
2021-03-05 10:09:12 -05:00
|
|
|
end
|
2021-09-14 20:09:30 -04:00
|
|
|
|
|
|
|
it_behaves_like 'dismissing user callout', UserCallout
|
2021-03-05 10:09:12 -05:00
|
|
|
end
|
|
|
|
end
|