Skip to content
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

fixtures_ok does not use arrayref as documented. #51

Open
Altreus opened this issue Jan 29, 2019 · 0 comments
Open

fixtures_ok does not use arrayref as documented. #51

Altreus opened this issue Jan 29, 2019 · 0 comments

Comments

@Altreus
Copy link

Altreus commented Jan 29, 2019

The documentation says I can do

fixtures_ok ["organisations", "respondents", "engagements", "questions"];

But this just crashes

# DBIx::Class::Schema::source(): Can't find source for organisations at /home/alastair.mcgowan/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/Test/DBIx/Class/FixtureCommand/Populate.pm line 43

This is because it makes no attempt to translate these fixture names into the actual fixtures:

["organisations", "respondents", "engagements", "questions"]
{ organisations => "respondents" }

These are first \@args at line 28, and then $definition at line 40:

https://github.com/jjn1056/Test-DBIx-Class/blob/master/lib/Test/DBIx/Class/FixtureCommand/Populate.pm#L28

https://github.com/jjn1056/Test-DBIx-Class/blob/master/lib/Test/DBIx/Class/FixtureCommand/Populate.pm#L40

However, the equivalent code works:

fixtures_ok 'organisations';
fixtures_ok 'respondents';
fixtures_ok 'engagements';
fixtures_ok 'questions';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant