mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 04:13:22 +08:00
14 lines
434 B
Ruby
14 lines
434 B
Ruby
require 'rails_helper'
|
|
|
|
describe UserField do
|
|
describe "doesn't validate presence of name if field type is 'confirm'" do
|
|
subject { described_class.new(field_type: 'confirm') }
|
|
it { is_expected.not_to validate_presence_of :name }
|
|
end
|
|
|
|
describe "validates presence of name for other field types" do
|
|
subject { described_class.new(field_type: 'dropdown') }
|
|
it { is_expected.to validate_presence_of :name }
|
|
end
|
|
end
|