|
14 | 14 | let(:custom_keys) { [:login, :logout] } |
15 | 15 | let(:operations) do |
16 | 16 | { |
17 | | - confirm: { klass: confirm_operation, authenticable: false }, |
18 | | - sign_up: { klass: sign_up_operation, authenticable: true }, |
19 | | - login: { klass: login_operation, authenticable: true }, |
20 | | - logout: { klass: logout_operation, authenticable: true } |
| 17 | + confirm: { klass: confirm_operation, authenticatable: false }, |
| 18 | + sign_up: { klass: sign_up_operation, authenticatable: true }, |
| 19 | + login: { klass: login_operation, authenticatable: true }, |
| 20 | + logout: { klass: logout_operation, authenticatable: true } |
21 | 21 | } |
22 | 22 | end |
23 | 23 |
|
|
26 | 26 | allow(default_preparer).to receive(:child_class).with(sign_up_operation).and_return(sign_up_operation) |
27 | 27 | allow(default_preparer).to receive(:child_class).with(login_operation).and_return(login_operation) |
28 | 28 | allow(default_preparer).to receive(:child_class).with(logout_operation).and_return(logout_operation) |
29 | | - allow(preparer).to receive(:call).with(confirm_operation, authenticable: false).and_return(confirm_operation) |
30 | | - allow(preparer).to receive(:call).with(sign_up_operation, authenticable: true).and_return(sign_up_operation) |
31 | | - allow(preparer).to receive(:call).with(login_operation, authenticable: true).and_return(login_operation) |
32 | | - allow(preparer).to receive(:call).with(logout_operation, authenticable: true).and_return(logout_operation) |
| 29 | + allow(preparer).to receive(:call).with(confirm_operation, authenticatable: false).and_return(confirm_operation) |
| 30 | + allow(preparer).to receive(:call).with(sign_up_operation, authenticatable: true).and_return(sign_up_operation) |
| 31 | + allow(preparer).to receive(:call).with(login_operation, authenticatable: true).and_return(login_operation) |
| 32 | + allow(preparer).to receive(:call).with(logout_operation, authenticatable: true).and_return(logout_operation) |
33 | 33 | end |
34 | 34 |
|
35 | 35 | it 'returns only those operations with no custom operation provided' do |
|
39 | 39 | it 'prepares default operations' do |
40 | 40 | expect(confirm_operation).to receive(:graphql_name).with('UserConfirm') |
41 | 41 | expect(sign_up_operation).to receive(:graphql_name).with('UserSignUp') |
42 | | - expect(preparer).to receive(:call).with(confirm_operation, authenticable: false) |
43 | | - expect(preparer).to receive(:call).with(sign_up_operation, authenticable: true) |
| 42 | + expect(preparer).to receive(:call).with(confirm_operation, authenticatable: false) |
| 43 | + expect(preparer).to receive(:call).with(sign_up_operation, authenticatable: true) |
44 | 44 |
|
45 | 45 | prepared |
46 | 46 |
|
|
0 commit comments