about summary refs log tree commit diff
path: root/spec/models/status_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/status_spec.rb')
-rw-r--r--spec/models/status_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb
index f7ee0a609..12efcae61 100644
--- a/spec/models/status_spec.rb
+++ b/spec/models/status_spec.rb
@@ -516,6 +516,14 @@ RSpec.describe Status, type: :model do
     end
   end
 
+  describe 'validation' do
+    it 'disallow empty uri for remote status' do
+      alice.update(domain: 'example.com')
+      status = Fabricate.build(:status, uri: '', account: alice)
+      expect(status).to model_have_error_on_field(:uri)
+    end
+  end
+
   describe 'after_create' do
     it 'saves ActivityPub uri as uri for local status' do
       status = Status.create(account: alice, text: 'foo')