2019-06-06 04:13:18 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe BoardsResponses do
|
|
|
|
let(:controller_class) do
|
|
|
|
Class.new do
|
|
|
|
include BoardsResponses
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
subject(:controller) { controller_class.new }
|
|
|
|
|
|
|
|
describe '#serialize_as_json' do
|
|
|
|
let!(:board) { create(:board) }
|
|
|
|
|
|
|
|
it 'serializes properly' do
|
2019-06-06 21:56:40 -04:00
|
|
|
expected = { "id" => board.id }
|
2019-06-06 04:13:18 -04:00
|
|
|
|
2019-06-10 06:30:00 -04:00
|
|
|
expect(subject.serialize_as_json(board)).to include(expected)
|
2019-06-06 04:13:18 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|