2019-09-04 21:01:54 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
RSpec.describe BoardsResponses do
|
2019-09-04 21:01:54 +05:30
|
|
|
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
|
|
|
|
expected = { "id" => board.id }
|
|
|
|
|
|
|
|
expect(subject.serialize_as_json(board)).to include(expected)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|