Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
added tests for CustomWizard::RealtimeValidation class
Dieser Commit ist enthalten in:
Ursprung
c45e51fcb6
Commit
c196c4fee7
1 geänderte Dateien mit 22 neuen und 0 gelöschten Zeilen
22
spec/components/custom_wizard/realtime_validation_spec.rb
Normale Datei
22
spec/components/custom_wizard/realtime_validation_spec.rb
Normale Datei
|
@ -0,0 +1,22 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../../plugin_helper'
|
||||
|
||||
describe CustomWizard::RealtimeValidation do
|
||||
context 'classes for every validation type exist' do
|
||||
validation_names = CustomWizard::RealtimeValidation.types.keys
|
||||
|
||||
validation_names.each do |name|
|
||||
klass_str = "CustomWizard::RealtimeValidation::#{name.to_s.camelize}"
|
||||
|
||||
it "ensure class for validation: #{name} exists" do
|
||||
expect(klass_str.safe_constantize).not_to be_nil
|
||||
end
|
||||
|
||||
it "#{klass_str} has a perform() method" do
|
||||
expect(klass_str.safe_constantize.instance_methods).to include(:perform)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Laden …
In neuem Issue referenzieren