Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-14 05:52:52 +01:00
19 Zeilen
556 B
Ruby
19 Zeilen
556 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative '../../plugin_helper'
|
|
|
|
describe CustomWizard::RealtimeValidation 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
|