# check parameters
my $msg = "";
$msg = "no_title" if !$params->{title};
- $msg = "no_introtext" if !$params->{introtext} || $params->{intro_text};
+ $msg = "no_introtext" if !$params->{introtext} && !$params->{intro_text};
$msg = "no_topics" if !defined $params->{topics_chosen};
$msg = "invalid_user" if !defined $user->{uid};
my $params = {
user => $user,
- title => "test story",
+ title => "test story for submission",
url => "http://example.com/",
email => 'foo@example.com',
introtext => '<p>foo bar hoge</p>',
};
my $subid = $submissions->create(%$params);
ok($subid, "create submission");
+ diag $submissions->last_error if !$subid;
my $subm = $submissions->select(submission_id => $subid);
ok($subm, "select story by submission_id");