fix test
Dieser Commit ist enthalten in:
Ursprung
ec88af0cc0
Commit
c26a89a78a
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
|
@ -5,7 +5,7 @@ describe CustomWizard::AdminWizardController do
|
|||
fab!(:user1) { Fabricate(:user) }
|
||||
fab!(:user2) { Fabricate(:user) }
|
||||
let(:template) { get_wizard_fixture("wizard") }
|
||||
let(:category) { Fabricate(:category, custom_fields: { create_topic_wizard: template['name'] }) }
|
||||
let(:category) { Fabricate(:category, custom_fields: { create_topic_wizard: template['name'].parameterize.underscore }) }
|
||||
|
||||
before do
|
||||
CustomWizard::Template.save(template, skip_jobs: true)
|
||||
|
@ -41,11 +41,11 @@ describe CustomWizard::AdminWizardController do
|
|||
end
|
||||
|
||||
it "removes wizard templates whilst making sure create_topic_wizard settings for that wizard are removed from Categories" do
|
||||
expect(CategoryCustomField.find_by(category_id: category.id, name: 'create_topic_wizard', value: template['name'])).not_to eq(nil)
|
||||
expect(CategoryCustomField.find_by(category_id: category.id, name: 'create_topic_wizard', value: template['name'].parameterize.underscore)).not_to eq(nil)
|
||||
delete "/admin/wizards/wizard/#{template['id']}.json"
|
||||
expect(response.status).to eq(200)
|
||||
expect(CustomWizard::Template.exists?(template['id'])).to eq(false)
|
||||
expect(CategoryCustomField.find_by(name: 'create_topic_wizard', value: template['name'])).to eq(nil)
|
||||
expect(CategoryCustomField.find_by(name: 'create_topic_wizard', value: template['name'].parameterize.underscore)).to eq(nil)
|
||||
end
|
||||
|
||||
it "saves wizard templates" do
|
||||
|
|
Laden …
In neuem Issue referenzieren