Actions
Bug #13272
closedBasic edit test can fail when fixtures don't exist for a particular model
Description
Some helper methods now exist for testing edit pages:
test/functional/shared/basic_rest_response_test.rb
basic_edit_test takes a record as an argument, which for most models is passed as `ModelClass.first`, however, .first may not exist at class evaluation if there's no fixtures. This is the case with Usergroups.
And due to database cleaning, the object needs to be created within the context of the basic_edit_test method, so passing something like FactoryGirl.create directly also doesn't work in some cases.
Updated by The Foreman Bot almost 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3092 added
Updated by Anonymous almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset fa383aa24bd2889bde0027c3f610e2fc5de74b1f.
Updated by Dominic Cleal almost 9 years ago
- Related to Refactor #11618: Replace validation tests by shoulda-matchers added
Updated by Dominic Cleal almost 9 years ago
- Translation missing: en.field_release set to 71
Actions