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
680 B
Ruby
Raw Normal View History

2022-08-27 11:52:29 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Users::DismissProjectCalloutService do
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