Update device create API

- Update the existing device if a device with existing unique_id is
   present
This commit is contained in:
Yedhu Krishnan
2015-10-18 11:13:20 +05:30
parent fb3b514f3d
commit 3947889282
3 changed files with 29 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ RSpec.describe Device, type: :model do
it { should validate_presence_of :model }
it { should validate_uniqueness_of :unique_id }
describe "after create" do
describe "before create" do
it "generates an access token for the device" do
expect(device.access_token).not_to be_nil
end