-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populate LevelConceptDifficulty fixture to fix assert_nil warning #13748
Conversation
Before adding this fixture, "level_concept_difficulty uses preloading" in `ScriptTest` only compared nil to nil.
AFAICT (though I'm not 100% certain), this change shouldn't be necessary. Presumably, if the DB is disconnected, the call to |
Oh dang, that's an unfortunate oversight. What we probably actually want to do is add an |
@ashercodeorg I'm not sure I follow. This is the code for the test: test 'level_concept_difficulty uses preloading' do
level = Script.find_by_name('course4').script_levels.second.level
expected = level.level_concept_difficulty
populate_cache_and_disconnect_db
assert_equal expected, level.level_concept_difficulty
end Without this change, |
Right. But you need the DB to know that it has no |
Ah, I see what you're saying. Added an |
LGTM. |
Before adding this fixture, "level_concept_difficulty uses preloading" in
ScriptTest
only compared nil to nil.Fixes: