Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-24 10:20:28 +01:00
DEV: Modify test for errors
Dieser Commit ist enthalten in:
Ursprung
779912332a
Commit
98391b565e
1 geänderte Dateien mit 5 neuen und 8 gelöschten Zeilen
|
@ -15,15 +15,12 @@ describe Topic, type: :model do
|
|||
user,
|
||||
Guardian.new(user),
|
||||
valid_attrs.merge(
|
||||
title: 'A valid and sufficiently long title for testing',
|
||||
category: category_with_wizard.id,
|
||||
raw: 'hello this is a test topic with category with custom fields'
|
||||
title: 'A valid title',
|
||||
raw: 'hello this is a test topic'
|
||||
)
|
||||
)
|
||||
end.to raise_error(
|
||||
Discourse::InvalidParameters,
|
||||
'Category not allowed for topic creation.'
|
||||
)
|
||||
end.to raise_error
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -35,8 +32,8 @@ describe Topic, type: :model do
|
|||
Guardian.new(user),
|
||||
valid_attrs.merge(
|
||||
category: category_without_wizard.id,
|
||||
title: 'Another valid and sufficiently long title for testing',
|
||||
raw: 'This is the body of a valid topic'
|
||||
title: 'Another valid title',
|
||||
raw: 'This is a valid topic'
|
||||
)
|
||||
)
|
||||
end.not_to raise_error
|
||||
|
|
Laden …
In neuem Issue referenzieren