We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
extract_attributes_and_predicates
1 parent c55bd54 commit 89e5da3Copy full SHA for 89e5da3
1 file changed
spec/filtering_spec.rb
@@ -12,6 +12,16 @@
12
end
13
14
15
+ context 'attributes with underscore in name' do
16
+ it 'detect _' do
17
+ attributes, predicates = JSONAPI::Filtering
18
+ .extract_attributes_and_predicates('notes_count_eq')
19
+ expect(attributes).to eq(['notes_count'])
20
+ expect(predicates.size).to eq(1)
21
+ expect(predicates[0].name).to eq('eq')
22
+ end
23
24
+
25
context 'mixed predicates' do
26
it 'extracts in order' do
27
attributes, predicates = JSONAPI::Filtering
@@ -93,7 +103,7 @@
93
103
}
94
104
95
105
96
- fit do
106
+ it do
97
107
expect(first_user.notes_count).to eq(0)
98
108
expect(second_user.notes_count).to eq(1)
99
109
expect(third_user.notes_count).to eq(0)
0 commit comments