contactually-api 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/contactually/contacts.rb +2 -1
- data/lib/contactually/version.rb +1 -1
- data/spec/contacts_spec.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad56375cc4f733c53ed4180d476bc435ca6d47eb
|
4
|
+
data.tar.gz: 368daf75ca9581ca6985c9bb79987789c617960f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 065e397609b59b9d0e5c5d6bf2843450e82bbc497863d3abde0ce2202f59efee70ef372412631b1fcc793012b6c07a61aacfb9941817ba9fc1947d060039ccca
|
7
|
+
data.tar.gz: 9bf5c9fed47a5140b5386de06f3b66fc77960bae25797ecbee0a3cab2bf33df5178081e434276a0444c34bda5618fe6b03376e74a65bf6bde4ab0418c1d140f4
|
data/lib/contactually/version.rb
CHANGED
data/spec/contacts_spec.rb
CHANGED
@@ -79,10 +79,15 @@ describe Contactually::Contacts do
|
|
79
79
|
|
80
80
|
describe '#update' do
|
81
81
|
it 'calls the api with correct params' do
|
82
|
-
allow(@master).to receive(:call).with('contacts/1.json', :put, { contact: { foo: :bar }})
|
82
|
+
allow(@master).to receive(:call).with('contacts/1.json', :put, { contact: { foo: :bar }}).and_return(JSON.load(contact_json))
|
83
83
|
subject.update(1, { contact: { foo: :bar } })
|
84
84
|
expect(@master).to have_received(:call)
|
85
85
|
end
|
86
|
+
|
87
|
+
it 'returns a contact from json response' do
|
88
|
+
allow(@master).to receive(:call).with('contacts/1.json', :put, { contact: { foo: :bar }}).and_return(JSON.load(contact_json))
|
89
|
+
expect(subject.update(1, { contact: { foo: :bar }})).to be_kind_of Contactually::Contact
|
90
|
+
end
|
86
91
|
end
|
87
92
|
|
88
93
|
describe '#index' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contactually-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Heck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|