restful_resource 0.8.6 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c8ff7b54b6bd02de7fac411b98da3cb79a71fc6
|
4
|
+
data.tar.gz: b31fe25509aef7e1f623d17321be1c29f91def57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd6688502d7c5a67dfe6b31e6e83af5b358c76b69e105c20a23c241fce60fa7e68fb2b0bc554784817f1eb6448a6ab61c58ed6e657f64ffb5a9026ba268bed56
|
7
|
+
data.tar.gz: 88913d9d3bac4ef6a7e68c73e8a10b375191cb9086b2c3e577cf77dc4262d091fe20d5fdc6f8780bd5248171ad536cf77c1838e504d1fa90703951f8094e906b
|
@@ -7,6 +7,24 @@ describe RestfulResource::RailsValidations do
|
|
7
7
|
RestfulResource::Base.base_url = "http://api.carwow.co.uk/"
|
8
8
|
end
|
9
9
|
|
10
|
+
context "#put without errors" do
|
11
|
+
before :each do
|
12
|
+
data = {name: 'Barak'}
|
13
|
+
expected_response = RestfulResource::Response.new(body: {name: 'Barak'}.to_json)
|
14
|
+
expect_put("http://api.carwow.co.uk/dealers/1", expected_response, data: data)
|
15
|
+
|
16
|
+
@object = Dealer.put(1, data: data)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should return object' do
|
20
|
+
expect(@object.name).to eq 'Barak'
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should return valid object' do
|
24
|
+
expect(@object.valid?).to be_truthy
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
10
28
|
context "#put with errors" do
|
11
29
|
before :each do
|
12
30
|
data = {name: 'Leonardo'}
|