summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/graphql/mutations/can_mutate_spammable_examples.rb
blob: b17e59f07973029b50bb1a1d2ec53e3086698cba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'spec_helper'

RSpec.shared_examples 'a mutation which can mutate a spammable' do
  describe "#spam_params" do
    it 'passes spam params to the service constructor' do
      args = [
        project: anything,
        current_user: anything,
        params: anything,
        spam_params: instance_of(::Spam::SpamParams)
      ]
      expect(service).to receive(:new).with(*args).and_call_original

      subject
    end
  end
end