Skip to content

Commit 5f73c2d

Browse files
author
Shuhei Kitagawa
committed
Add a test for to_json
1 parent 72b6aa5 commit 5f73c2d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec/lib/multi_to_json_spec.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
require 'spec_helper'
2+
3+
describe FastJsonapi::MultiToJson do
4+
include_context 'movie class'
5+
6+
describe 'self.to_json' do
7+
subject { FastJsonapi::MultiToJson.to_json movie }
8+
9+
it { is_expected.to eq("{\"id\":232,\"name\":\"test movie\",\"actor_ids\":[1,2,3],\"owner_id\":3,\"movie_type_id\":1}") }
10+
end
11+
end

0 commit comments

Comments
 (0)