feat: common attachment endpoint follow-up changes (#7826)

This commit is contained in:
Shivam Mishra
2023-09-01 15:18:48 +07:00
committed by GitHub
parent 2acf09b3eb
commit 9ebabb9832
14 changed files with 11 additions and 114 deletions

View File

@@ -128,7 +128,7 @@ RSpec.describe 'Api::V1::Accounts::AutomationRulesController', type: :request do
expect(account.automation_rules.count).to eq(0)
post "/api/v1/accounts/#{account.id}/automation_rules/attach_file",
post '/api/v1/upload',
headers: administrator.create_new_auth_token,
params: { attachment: file }
@@ -163,13 +163,13 @@ RSpec.describe 'Api::V1::Accounts::AutomationRulesController', type: :request do
file_1 = fixture_file_upload(Rails.root.join('spec/assets/avatar.png'), 'image/png')
file_2 = fixture_file_upload(Rails.root.join('spec/assets/sample.png'), 'image/png')
post "/api/v1/accounts/#{account.id}/automation_rules/attach_file",
post '/api/v1/upload',
headers: administrator.create_new_auth_token,
params: { attachment: file_1 }
blob_1 = response.parsed_body
post "/api/v1/accounts/#{account.id}/automation_rules/attach_file",
post '/api/v1/upload',
headers: administrator.create_new_auth_token,
params: { attachment: file_2 }