1
0
Fork 0

Fix failing specs

Dieser Commit ist enthalten in:
Angus McLeod 2023-06-02 12:51:28 +02:00
Ursprung c256a41668
Commit 2fe8501c65
3 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
# name: discourse-custom-wizard # name: discourse-custom-wizard
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
# version: 2.4.2 # version: 2.4.3
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever
# url: https://github.com/paviliondev/discourse-custom-wizard # url: https://github.com/paviliondev/discourse-custom-wizard
# contact_emails: development@pavilion.tech # contact_emails: development@pavilion.tech

Datei anzeigen

@ -2,9 +2,9 @@
describe CustomWizard::Log do describe CustomWizard::Log do
before do before do
CustomWizard::Log.create('first-test-wizard', 'perform_first_action', 'first_test_user', 'First log message') CustomWizard::Log.create('first-test-wizard', 'perform_first_action', 'first_test_user', 'First log message', 5.minutes.ago)
CustomWizard::Log.create('second-test-wizard', 'perform_second_action', 'second_test_user', 'Second log message') CustomWizard::Log.create('second-test-wizard', 'perform_second_action', 'second_test_user', 'Second log message', 3.minutes.ago)
CustomWizard::Log.create('third-test-wizard', 'perform_third_action', 'third_test_user', 'Third log message') CustomWizard::Log.create('third-test-wizard', 'perform_third_action', 'third_test_user', 'Third log message', 1.minutes.ago)
end end
it "creates logs" do it "creates logs" do

Datei anzeigen

@ -281,13 +281,13 @@ describe CustomWizard::Mapper do
it "avatar with valid size" do it "avatar with valid size" do
avatar_inputs = inputs['interpolate_avatar'].dup avatar_inputs = inputs['interpolate_avatar'].dup
avatar_inputs[0]["output"] = "Avatar: ![avatar](u{avatar.120})" avatar_inputs[0]["output"] = "Avatar: ![avatar](u{avatar.144})"
expect(CustomWizard::Mapper.new( expect(CustomWizard::Mapper.new(
inputs: avatar_inputs, inputs: avatar_inputs,
data: data, data: data,
user: user1 user: user1
).perform).to eq("Avatar: ![avatar](#{user1.avatar_template_url.gsub("{size}", "120")})") ).perform).to eq("Avatar: ![avatar](#{user1.avatar_template_url.gsub("{size}", "144")})")
end end
end end