Browse Source

Maintenance: Ensure stable testing for public links.

Florian Liebe 2 years ago
parent
commit
c15b63a327

+ 2 - 1
spec/factories/public_link.rb

@@ -2,7 +2,8 @@
 
 FactoryBot.define do
   factory :public_link do
-    link          { "https://zammad#{SecureRandom.random_number(1000) + 1234}.com" }
+    sequence(:link) { |i| "https://zammad#{i}.com" }
+
     title         { 'Zammad Homepage' }
     description   { 'Our fancy homepage.' }
     screen        { ['login'] }

+ 1 - 1
spec/graphql/gql/mutations/account/avatar/delete_spec.rb

@@ -48,7 +48,7 @@ RSpec.describe Gql::Mutations::Account::Avatar::Delete, type: :graphql do
     end
 
     context 'with not existing avatar' do
-      let(:variables) { { id: SecureRandom.random_number(1_000_000) + 123_456 } }
+      let(:variables) { { id: 123_456_789 } }
 
       it 'fails with error message' do
         expect(gql.result.error_message).to eq("Could not find Avatar #{variables[:id]}")