[Koha-bugs] [Bug 33833] Remove Test::DBIx::Class from t/SocialData.t

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 13 16:20:21 CEST 2023


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

--- Comment #12 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Jonathan Druart from comment #11)
> It's data dependent, not database dependent. We should actually use more
> Test::DBIx::Class IMO. I don't get why we should remove it from these tests.

Yeah, every test is probably data dependent :)
Well, I would rather opt for removing Test::DBIx::Class. I do not see why we
should use it for a few tests while we normally build the needed data with
TestBuilder. (Sometimes we still access the db while perhaps thinking we dont.)
Code maintenance wise easier to have one approach. TDC can oversimplify things
too, and eliminate constraints that we actually do need.

In this specific case not very hard to see what happens. The module is strongly
connected to the associated table.
I would rather use t for tests that do not need any access to the database or
some mock via TDC.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list