debian-mirror-gitlab/spec/services/users/dismiss_callout_service_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
498 B
Ruby
Raw Normal View History

2021-04-17 20:07:23 +05:30
# frozen_string_literal: true
require 'spec_helper'
2022-01-26 12:08:38 +05:30
RSpec.describe Users::DismissCalloutService 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