2021-03-05 10:09:12 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2021-12-10 13:14:42 -05:00
|
|
|
RSpec.describe Users::DismissCalloutService do
|
2021-03-05 10:09:12 -05:00
|
|
|
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 } }
|
2021-12-10 13:14:42 -05:00
|
|
|
let(:feature_name) { Users::Callout.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
|
|
|
|
2021-12-10 13:14:42 -05:00
|
|
|
it_behaves_like 'dismissing user callout', Users::Callout
|
2021-03-05 10:09:12 -05:00
|
|
|
end
|
|
|
|
end
|