Slide 67
Slide 67 text
https://github.com/asonas/chatwork-ruby/blob/v0.11.0/spec/lib/chatwork/message_spec.rb#L24-L36
67
Tips. Use official schema in test code
describe ".create", type: :api do
subject { ChatWork::Message.create(room_id: room_id, body: body, self_unread: self_unread,
&block) }
let(:room_id) { 123 }
let(:body) { "Hello Chatwork!" }
let(:self_unread ) { false }
before do
stub_chatwork_request( :post, "/rooms/#{room_id}/messages", "/rooms/{room_id}/messages" )
end
it_behaves_like :a_chatwork_api , :post, "/rooms/{room_id}/messages"
end