We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4bafdf commit 0cb3d26Copy full SHA for 0cb3d26
spec/stats_spec.rb
@@ -169,4 +169,12 @@ def index
169
expect(json['meta']['stats']).to eq({ 'total' => { 'count' => 1 } })
170
end
171
172
+
173
+ context 'when requested stat not configured' do
174
+ it 'raises error' do
175
+ expect {
176
+ get :index, params: { stats: { asdf: :count} }
177
+ }.to raise_error(JsonapiCompliable::Errors::StatNotFound, "No stat configured for calculation :count on attribute 'asdf'")
178
+ end
179
180
0 commit comments