Skip to content

Commit 741cf22

Browse files
committed
make a variable for the request
1 parent 03896a9 commit 741cf22

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

spec/fixtures/slack/web/files_upload_v2_with_channels_array.yml

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/slack/web/api/endpoints/custom_specs/files_spec.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
let(:required_params) do
77
{ filename: 'test.txt', content: 'Test File Contents', channels: 'C08AZ76CA4V' }
88
end
9+
let(:required_params_with_channel_array) do
10+
required_params.merge!({ channels: 'C08AZ76CA4V,C08BHPZBZ8A' })
11+
end
912
let(:all_params) do
1013
required_params.merge!({ title: 'title', initial_comment: 'initial_comment', thread_ts: '1738331914.958599',
1114
snippet_type: 'text' })
@@ -48,12 +51,8 @@
4851
end
4952

5053
context 'when using an array for channels', vcr: { cassette_name: 'web/files_upload_v2_with_channels_array' } do
51-
before do
52-
required_params[:channels] = "#{required_params[:channels]},C08BHPZBZ8A"
53-
end
54-
5554
it 'completes the upload' do
56-
client.files_upload_v2(required_params)
55+
client.files_upload_v2(required_params_with_channel_array)
5756
end
5857
end
5958

0 commit comments

Comments
 (0)