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

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

26 lines
716 B
Ruby
Raw Permalink Normal View History

2022-08-27 11:52:29 +05:30
# frozen_string_literal: true
require 'spec_helper'
2023-05-27 22:25:52 +05:30
RSpec.describe Users::DismissProjectCalloutService, feature_category: :user_management do
2022-08-27 11:52:29 +05:30
describe '#execute' do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:params) { { feature_name: feature_name, project_id: project.id } }
let(:feature_name) { Users::ProjectCallout.feature_names.each_key.first }
subject(:execute) do
described_class.new(
container: nil, current_user: user, params: params
).execute
end
it_behaves_like 'dismissing user callout', Users::ProjectCallout
it 'sets the project_id' do
expect(execute.project_id).to eq(project.id)
end
end
end