mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 02:28:50 +01:00
Add tests for status change
This commit is contained in:
@@ -14,6 +14,12 @@ class ProblemTest < ActiveSupport::TestCase
|
||||
assert problems(:one).is_translated?
|
||||
end
|
||||
|
||||
test "set_translation should modify status correctly" do
|
||||
problems(:two).set_translation(translations(:translation_two_alternative))
|
||||
assert translations(:translation_two).outdated?
|
||||
assert translations(:translation_two_alternative).in_use?
|
||||
end
|
||||
|
||||
test "should have correct original url" do
|
||||
assert_equal "https://projecteuler.net/problem=1", problems(:one).original_url
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user