Task #2424
openFeature #2422: exam automated tests
write unit tests
Updated by Phil Hodgson over 10 years ago
- Status changed from New to In Progress
- Start date set to 04/01/2014
Updated by Phil Hodgson over 10 years ago
- Status changed from In Progress to New
Updated by Phil Hodgson over 10 years ago
I've seen in test/unit/exam_test.rb
a failure on the version of the exam shown to the user. The test says that it should be the version of the exam that was created last before the user was created. And the Exam#version_for
method takes a user record parameter, but then it promptly fails to reference the user record. The #version_for
method in fact only returns the most recent exam version that exists, plain and simple. Which is correct?
Updated by Ward Vandewege over 10 years ago
Phil Hodgson wrote:
I've seen in
test/unit/exam_test.rb
a failure on the version of the exam shown to the user. The test says that it should be the version of the exam that was created last before the user was created. And theExam#version_for
method takes a user record parameter, but then it promptly fails to reference the user record. The#version_for
method in fact only returns the most recent exam version that exists, plain and simple. Which is correct?
Yeah. The test is wrong; the user should always get the most recent exam version. The policy changed at some point.
Thanks,
Ward.
Updated by Phil Hodgson over 10 years ago
- Status changed from New to In Progress
I would recommend then that the #version_for
method be removed and all its uses refactored to use a new #last_published_version
method. It's too confusing otherwise and not worth the logic that "maybe someday we'll want to use the User
parameter again" - if we ever do, we'll refactor again.
Updated by Phil Hodgson over 10 years ago
- Status changed from In Progress to New