mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Fix Style/GuardClause in Tag (#35522)
This commit is contained in:
parent
eb73ae2f86
commit
040a638ab9
2 changed files with 7 additions and 4 deletions
|
|
@ -17,6 +17,7 @@ RSpec.describe Tag do
|
|||
subject { Fabricate :tag, name: 'original' }
|
||||
|
||||
it { is_expected.to_not allow_value('changed').for(:name).with_message(previous_name_error_message) }
|
||||
it { is_expected.to allow_value('ORIGINAL').for(:name) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -31,6 +32,7 @@ RSpec.describe Tag do
|
|||
subject { Fabricate :tag, name: 'original', display_name: 'OriginalDisplayName' }
|
||||
|
||||
it { is_expected.to_not allow_value('ChangedDisplayName').for(:display_name).with_message(previous_name_error_message) }
|
||||
it { is_expected.to allow_value('ORIGINAL').for(:display_name) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue