https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36765

            Bug ID: 36765
           Summary: TestBuilder should explode if FK broken
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

Right now, it only warns and continues. While this might mean 'there already
exists a resource with the value we need for the test', this is really hiding a
design issue with the tests.

For example

```perl
my $library = $builde->build_object(
    {
        class => 'Koha::Libraries,
        value => { branchcode => 'ILL', pickup_location => 1 }
    }
);
```

might fail because 'ILL' already exists, but if the DB entry doesn't contain
the other fixed condition (pickup_location=1) then the tests could fail
weirdly, and tracking it would be harder (i.e. you read the code, see you are
setting pickup_location=1, but it fails because it is not).

I propose we make it explode loudly instead. And fix the poorly written tests
that explode because of it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to