mirror of
https://github.com/projekteuler/projekteuler.git
synced 2025-12-10 16:46:42 +01:00
14 lines
560 B
Ruby
14 lines
560 B
Ruby
require 'test_helper'
|
|
|
|
class ApplicationHelperTest < ActionView::TestCase
|
|
test "bootstrap classes for flash should return correct values" do
|
|
assert_equal "alert-danger", bootstrap_class_for(:error)
|
|
assert_equal "alert-success", bootstrap_class_for(:success)
|
|
end
|
|
|
|
test "bootstrap flash messages should work" do
|
|
flash[:error] = "Error"
|
|
assert_equal "<div class=\"alert alert-danger alert-dismissible\" role=\"alert\">Error<button class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button></div>", flash_messages
|
|
end
|
|
end
|