spec/lib/chatwork/room_spec.rb in chatwork-0.7.0 vs spec/lib/chatwork/room_spec.rb in chatwork-0.8.0
- old
+ new
@@ -1,8 +1,8 @@
describe ChatWork::Room do
describe ".get", type: :api do
- subject { ChatWork::Room.get }
+ subject { ChatWork::Room.get(&block) }
let(:room_id) { 123 }
before do
stub_chatwork_request(:get, "/rooms")
@@ -21,10 +21,11 @@
members_readonly_ids: members_readonly_ids,
name: name,
link: link,
link_code: link_code,
link_need_acceptance: link_need_acceptance,
+ &block
)
end
let(:description) { "group chat description" }
let(:icon_preset) { "meeting" }
@@ -53,11 +54,11 @@
it_behaves_like :a_chatwork_api, :post, "/rooms"
end
end
describe ".find", type: :api do
- subject { ChatWork::Room.find(room_id: room_id) }
+ subject { ChatWork::Room.find(room_id: room_id, &block) }
let(:room_id) { 123 }
before do
stub_chatwork_request(:get, "/rooms/#{room_id}", "/rooms/{room_id}")
@@ -71,10 +72,11 @@
ChatWork::Room.update(
room_id: room_id,
description: description,
icon_preset: icon_preset,
name: name,
+ &block
)
end
let(:room_id) { 123 }
let(:description) { "group chat description" }
@@ -91,9 +93,10 @@
describe ".destroy", type: :api do
subject do
ChatWork::Room.destroy(
room_id: room_id,
action_type: action_type,
+ &block
)
end
let(:room_id) { 123 }
let(:action_type) { "leave" }