mirror of
https://github.com/mastodon/mastodon.git
synced 2026-04-19 05:29:26 -05:00
Some checks failed
Check i18n / check-i18n (push) Has been cancelled
Chromatic / Check for relevant changes (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (ruby) (push) Has been cancelled
Crowdin / Upload translations / upload-translations (push) Has been cancelled
Check formatting / lint (push) Has been cancelled
CSS Linting / lint (push) Has been cancelled
JavaScript Linting / lint (push) Has been cancelled
Ruby Linting / lint (push) Has been cancelled
JavaScript Testing / test (push) Has been cancelled
Historical data migration test / test (14-alpine) (push) Has been cancelled
Historical data migration test / test (15-alpine) (push) Has been cancelled
Historical data migration test / test (16-alpine) (push) Has been cancelled
Historical data migration test / test (17-alpine) (push) Has been cancelled
Ruby Testing / build (production) (push) Has been cancelled
Ruby Testing / build (test) (push) Has been cancelled
Chromatic / Run Chromatic (push) Has been cancelled
Ruby Testing / test (.ruby-version) (push) Has been cancelled
Ruby Testing / test (3.2) (push) Has been cancelled
Ruby Testing / test (3.3) (push) Has been cancelled
Ruby Testing / End to End testing (.ruby-version) (push) Has been cancelled
Ruby Testing / End to End testing (3.2) (push) Has been cancelled
Ruby Testing / End to End testing (3.3) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Bundler Audit / security (push) Has been cancelled
34 lines
1.1 KiB
Ruby
34 lines
1.1 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe 'Api::Fasp::Debug::V0::Callback::Responses', feature: :fasp do
|
|
include ProviderRequestHelper
|
|
|
|
describe 'POST /api/fasp/debug/v0/callback/responses' do
|
|
subject do
|
|
post api_fasp_debug_v0_callback_responses_path, headers:, params: payload, as: :json
|
|
end
|
|
|
|
let(:provider) { Fabricate(:confirmed_fasp) }
|
|
let(:payload) { { test: 'call' } }
|
|
let(:headers) do
|
|
request_authentication_headers(provider,
|
|
url: api_fasp_debug_v0_callback_responses_url,
|
|
method: :post,
|
|
body: payload)
|
|
end
|
|
|
|
it_behaves_like 'forbidden for unconfirmed provider'
|
|
|
|
it 'create a record of the callback' do
|
|
expect { subject }.to change(Fasp::DebugCallback, :count).by(1)
|
|
expect(response).to have_http_status(201)
|
|
|
|
debug_callback = Fasp::DebugCallback.last
|
|
expect(debug_callback.fasp_provider).to eq provider
|
|
expect(debug_callback.request_body).to eq '{"test":"call"}'
|
|
end
|
|
end
|
|
end
|