about summary refs log tree commit diff
path: root/spec/controllers/activitypub/claims_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/activitypub/claims_controller_spec.rb')
-rw-r--r--spec/controllers/activitypub/claims_controller_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/controllers/activitypub/claims_controller_spec.rb b/spec/controllers/activitypub/claims_controller_spec.rb
new file mode 100644
index 000000000..f00eeb732
--- /dev/null
+++ b/spec/controllers/activitypub/claims_controller_spec.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+
+describe ActivityPub::ClaimsController do
+  let(:account) { Fabricate(:account) }
+
+  describe 'POST #create' do
+    context 'without signature' do
+      before do
+        post :create, params: { account_username: account.username }, body: '{}'
+      end
+
+      it 'returns http not authorized' do
+        expect(response).to have_http_status(401)
+      end
+    end
+  end
+end