Add GCM token field to device

This commit is contained in:
leenasn
2015-11-13 15:52:18 +05:30
parent 6dc20841c0
commit 93e3095925
6 changed files with 13 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
FactoryGirl.define do
factory :device do
model "Nexus 6"
unique_id "someuniqueid"
imei_number "someimeinumber"
model "LGE - Nexus 5"
unique_id "aa55589dd10a8819"
gcm_token "dAJukxHtV84iij0z5PJruUhcNnQSOl7NdeAWS9Y45UVhPoG1wRGp7i2Hp34SyrodDfdZieeDzbPusqYyFuEB_vAUl5EDyYqFdzMNF1JpN2ThkEl_dTawWP9F9rSsNadV1HZ"
end
end

View File

@@ -5,6 +5,7 @@ RSpec.describe Device, type: :model do
it { should validate_presence_of :unique_id }
it { should validate_presence_of :model }
it { should validate_presence_of :gcm_token }
it { should validate_uniqueness_of :unique_id }
describe "before create" do