Test Your Knowledge!
Take this quiz to test what you've learned in this chapter.
We'll cover the following...
We'll cover the following...
Quiz on testing macros.
1.
Take the following module as reference:
defmodule I18n do
use Translator
locale "hp",
flash: [
disclaimer: [
notice: "Wizards are %{adjective},
],
],
wizards: [
name: "Harry",
]
Which of the following test cases could be used for testing if the wizards
field gives the correct output?
A.
test "Wizards test" do
assert I18n.t("hp", "wizards.name", adjective: "amazing") ==
"Wizards"
end
B.
test "Wizards test" do
assert I18n.t("hp", "wizards.disclaimer", name: "Harry") ==
"Harry"
end
C.
test "Wizards test" do
assert I18n.t("hp", "wizards.name") ==
"Harry"
end
1 / 6