2021-04-17 20:07:23 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2023-05-27 22:25:52 +05:30
|
|
|
RSpec.describe Users::DismissCalloutService, feature_category: :user_management do
|
2021-04-17 20:07:23 +05:30
|
|
|
describe '#execute' do
|
2021-11-11 11:23:49 +05:30
|
|
|
let_it_be(:user) { create(:user) }
|
2021-04-17 20:07:23 +05:30
|
|
|
|
2021-11-11 11:23:49 +05:30
|
|
|
let(:params) { { feature_name: feature_name } }
|
2022-01-26 12:08:38 +05:30
|
|
|
let(:feature_name) { Users::Callout.feature_names.each_key.first }
|
2021-04-17 20:07:23 +05:30
|
|
|
|
2021-11-11 11:23:49 +05:30
|
|
|
subject(:execute) do
|
|
|
|
described_class.new(
|
|
|
|
container: nil, current_user: user, params: params
|
|
|
|
).execute
|
2021-04-17 20:07:23 +05:30
|
|
|
end
|
2021-11-11 11:23:49 +05:30
|
|
|
|
2022-01-26 12:08:38 +05:30
|
|
|
it_behaves_like 'dismissing user callout', Users::Callout
|
2021-04-17 20:07:23 +05:30
|
|
|
end
|
|
|
|
end
|