about summary refs log tree commit diff
path: root/spec/services
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-01-24 14:37:06 +0100
committerThibaut Girka <thib@sitedethib.com>2020-01-24 14:37:06 +0100
commit9adeaf2bfc1c16ca70e611b5288886b21414217b (patch)
tree53372bc9bd6f38d158aad50c768e18773b7d3f3b /spec/services
parenta8c109baca4d02cc8aed454e231518c1f8ec1844 (diff)
parent4bae4e972d43f71bffb888ac82c180b2fa3f1ada (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/controllers/statuses_controller.rb`:
  Minor conflict due to theming system
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/post_status_service_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb
index bf06f50e9..025a3da40 100644
--- a/spec/services/post_status_service_spec.rb
+++ b/spec/services/post_status_service_spec.rb
@@ -212,14 +212,18 @@ RSpec.describe PostStatusService, type: :service do
 
   it 'does not allow attaching both videos and images' do
     account = Fabricate(:account)
+    video   = Fabricate(:media_attachment, type: :video, account: account)
+    image   = Fabricate(:media_attachment, type: :image, account: account)
+
+    video.update(type: :video)
 
     expect do
       subject.call(
         account,
         text: "test status update",
         media_ids: [
-          Fabricate(:media_attachment, type: :video, account: account),
-          Fabricate(:media_attachment, type: :image, account: account),
+          video,
+          image,
         ].map(&:id),
       )
     end.to raise_error(