mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 07:23:43 +01:00
Add specs for ActivityPub::InboxesController (#9456)
This commit is contained in:
parent
88b3eed16f
commit
d3547fa005
1 changed files with 23 additions and 1 deletions
|
@ -1,7 +1,29 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe ActivityPub::InboxesController, type: :controller do
|
RSpec.describe ActivityPub::InboxesController, type: :controller do
|
||||||
describe 'POST #create' do
|
describe 'POST #create' do
|
||||||
pending
|
context 'if signed_request_account' do
|
||||||
|
it 'returns 202' do
|
||||||
|
allow(controller).to receive(:signed_request_account) do
|
||||||
|
Fabricate(:account)
|
||||||
|
end
|
||||||
|
|
||||||
|
post :create
|
||||||
|
expect(response).to have_http_status(202)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'not signed_request_account' do
|
||||||
|
it 'returns 401' do
|
||||||
|
allow(controller).to receive(:signed_request_account) do
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
|
post :create
|
||||||
|
expect(response).to have_http_status(401)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue