|
14 | 14 | } |
15 | 15 | end |
16 | 16 |
|
17 | | - let(:mutations) { { mutation_1: Class.new, mutation_2: Class.new } } |
18 | | - let(:queries) { { query_1: Class.new, query_2: Class.new } } |
| 17 | + let(:mutations) { { mutation1: Class.new, mutation2: Class.new } } |
| 18 | + let(:queries) { { query1: Class.new, query2: Class.new } } |
19 | 19 | let(:custom) { {} } |
20 | 20 | let(:only) { [] } |
21 | 21 | let(:skipped) { [] } |
|
25 | 25 | end |
26 | 26 |
|
27 | 27 | context 'when custom mutations and queries passed are among the defaults' do |
28 | | - let(:custom) { { mutation_1: Class.new, query_2: Class.new } } |
| 28 | + let(:custom) { { mutation1: Class.new, query2: Class.new } } |
29 | 29 |
|
30 | 30 | it { is_expected.not_to raise_error } |
31 | 31 | end |
32 | 32 |
|
33 | 33 | context 'when only operations are among the defaults' do |
34 | | - let(:only) { [:mutation_1, :query_2] } |
| 34 | + let(:only) { [:mutation1, :query2] } |
35 | 35 |
|
36 | 36 | it { is_expected.not_to raise_error } |
37 | 37 | end |
38 | 38 |
|
39 | 39 | context 'when skipped operations are among the defaults' do |
40 | | - let(:skipped) { [:mutation_2, :query_1] } |
| 40 | + let(:skipped) { [:mutation2, :query1] } |
41 | 41 |
|
42 | 42 | it { is_expected.not_to raise_error } |
43 | 43 | end |
44 | 44 |
|
45 | 45 | context 'when only and skipped operations are both defined' do |
46 | | - let(:only) { [:mutation_1, :query_2] } |
47 | | - let(:skipped) { [:mutation_2, :query_1] } |
| 46 | + let(:only) { [:mutation1, :query2] } |
| 47 | + let(:skipped) { [:mutation2, :query1] } |
48 | 48 |
|
49 | 49 | it { |
50 | 50 | is_expected.to( |
|
57 | 57 | end |
58 | 58 |
|
59 | 59 | context 'when custom operations include a not supported item' do |
60 | | - let(:custom) { { mutation_3: Class.new, query_2: Class.new } } |
| 60 | + let(:custom) { { mutation3: Class.new, query2: Class.new } } |
61 | 61 |
|
62 | 62 | it { |
63 | 63 | is_expected.to( |
64 | 64 | raise_error( |
65 | 65 | GraphqlDevise::Error, |
66 | | - 'Custom operation "mutation_3" is not supported. Check for typos.' |
| 66 | + 'Custom operation "mutation3" is not supported. Check for typos.' |
67 | 67 | ) |
68 | 68 | ) |
69 | 69 | } |
70 | 70 | end |
71 | 71 |
|
72 | 72 | context 'when skipped operations include a not supported item' do |
73 | | - let(:skipped) { [:mutation_3, :query_2] } |
| 73 | + let(:skipped) { [:mutation3, :query2] } |
74 | 74 |
|
75 | 75 | it { |
76 | 76 | is_expected.to( |
77 | 77 | raise_error( |
78 | 78 | GraphqlDevise::Error, |
79 | | - 'Trying to skip unsupported operation "mutation_3". Check for typos.' |
| 79 | + 'Trying to skip unsupported operation "mutation3". Check for typos.' |
80 | 80 | ) |
81 | 81 | ) |
82 | 82 | } |
83 | 83 | end |
84 | 84 |
|
85 | 85 | context 'when only operations include a not supported item' do |
86 | | - let(:only) { [:mutation_3, :query_2] } |
| 86 | + let(:only) { [:mutation3, :query2] } |
87 | 87 |
|
88 | 88 | it { |
89 | 89 | is_expected.to( |
90 | 90 | raise_error( |
91 | 91 | GraphqlDevise::Error, |
92 | | - 'The "only" operation "mutation_3" is not supported. Check for typos.' |
| 92 | + 'The "only" operation "mutation3" is not supported. Check for typos.' |
93 | 93 | ) |
94 | 94 | ) |
95 | 95 | } |
|
0 commit comments