test/resource_test.rb in loquor-0.3.0 vs test/resource_test.rb in loquor-0.4.0
- old
+ new
@@ -28,7 +28,14 @@
def test_where_should_get_correct_path_with_simple_path
email = "foobar"
Loquor.expects(:get).with("/foobar?email=#{email}").returns([])
Foobar.where(email: email).to_a
end
+
+ def test_update_should_put_correct_params
+ id = 8
+ payload = {bar: 'foo'}
+ Loquor.expects(:put).with("/foobar/#{id}", payload: payload)
+ Foobar.update(id, payload)
+ end
end
end