Add room and track serilizer tests

This commit is contained in:
Aditya Prakash 2016-04-02 20:58:16 +05:30
parent 80f63c7263
commit a786321800
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,17 @@
require 'spec_helper'
describe RoomSerializer, type: :serializer do
let(:room) { create(:room) }
let(:serializer) { RoomSerializer.new(room) }
it 'set guid, name and description' do
expected_json = {
room: {
guid: room.guid,
name: 'Example Room',
description: ''
}
}.to_json
expect(serializer.to_json).to eq expected_json
end
end