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