Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
abeverley committed Oct 20, 2023
1 parent 201ddbc commit 2810c6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/GADS/Schema/ResultSet/User.pm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ sub create_user
my $request_base = $params{request_base};

my $user = $self->create({
username => $params{username},
email => $params{email},
username => $params{email},
resetpw => $code,
created => DateTime->now,
});
Expand Down
2 changes: 1 addition & 1 deletion t/024_user.t
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ try { $schema->resultset('User')->create_user(%template, email => $existing) };
like($@, qr/already exists/, "Unable to create user with existing username");

# Same directly in resultset
try { $schema->resultset('User')->create({email => $existing}) };
try { $schema->resultset('User')->create({email => $existing, username => $existing}) };
like($@, qr/already exists/, "Unable to create user with existing username");

$site->update({ register_organisation_mandatory => 1 });
Expand Down

0 comments on commit 2810c6e

Please sign in to comment.