diff options
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/concerns/boards_responses_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/controllers/concerns/boards_responses_spec.rb b/spec/controllers/concerns/boards_responses_spec.rb new file mode 100644 index 00000000000..1c837fe8755 --- /dev/null +++ b/spec/controllers/concerns/boards_responses_spec.rb @@ -0,0 +1,23 @@ +# 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 + expected = { id: board.id } + + expect(subject.serialize_as_json(board).to_h).to include(expected) + end + end +end |