Add webcam_url to serializer, update tests

pull/270/head
Rick Carlino 2016-09-15 16:52:28 -05:00
parent ddf96ed0e0
commit f7451eb7bd
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,3 @@
class DeviceSerializer < ActiveModel::Serializer
attributes :id, :name, :uuid
attributes :id, :name, :uuid, :webcam_url
end

View File

@ -10,7 +10,8 @@ describe Api::TokensController do
payload = {user: {email: user.email, password: "password"}}
post :create, payload
token = json[:token][:unencoded]
expect(token[:iss]).to eq("http://test.host/")
expect(token[:iss].last).not_to eq("/") # Trailing slashes are BAD!
expect(token[:iss]).to eq("http://localhost:3000")
end
end
end