collection_json_rails 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 288b63d473c62125ccf2e7c6a4e80484c7d74398
|
4
|
+
data.tar.gz: 775ecb12f1a7b150ec590108922ffacc031592cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 193a143cd2b270066c5598bb8a2c0b6bdb47b4e469a470a3a13b91ba9b1a1353d4a17e5b48633fe2b3a5f2dcd643279a76301befc24bc5d1e6a9577902c13b70
|
7
|
+
data.tar.gz: 0e2eac5476864c51c6119da0d06d02559012ee18ecb0037be4399c38d42b52016602153257461cd5e5ea95f8ce20b0a46acb81facce04c0362e7524af4a9fdc8
|
@@ -5,6 +5,10 @@ class PostsController < ActionController::Base
|
|
5
5
|
render json: { my_hash: "should be jsonified too" }
|
6
6
|
end
|
7
7
|
|
8
|
+
def empty_array
|
9
|
+
render json: []
|
10
|
+
end
|
11
|
+
|
8
12
|
def without_json
|
9
13
|
render nothing: true
|
10
14
|
end
|
@@ -19,6 +23,13 @@ class TestRender < ActionController::TestCase
|
|
19
23
|
assert_equal "application/vnd.collection+json", response.content_type
|
20
24
|
end
|
21
25
|
|
26
|
+
def test_that_an_empty_array_responds_with_success
|
27
|
+
get :empty_array
|
28
|
+
|
29
|
+
assert_response :ok
|
30
|
+
assert_equal Mime::JSON, response.content_type
|
31
|
+
end
|
32
|
+
|
22
33
|
def test_that_objects_without_serializer_are_rendered_as_plain_json
|
23
34
|
get :without_serializer
|
24
35
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: collection_json_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carles Jove i Buxeda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: collection_json_serializer
|