diff options
Diffstat (limited to 't/app')
-rw-r--r-- | t/app/model/comment.t | 27 | ||||
-rw-r--r-- | t/app/model/problem.t | 34 |
2 files changed, 61 insertions, 0 deletions
diff --git a/t/app/model/comment.t b/t/app/model/comment.t new file mode 100644 index 000000000..93104c2e5 --- /dev/null +++ b/t/app/model/comment.t @@ -0,0 +1,27 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More tests => 2; + +use FixMyStreet; +use FixMyStreet::App; + +my $comment_rs = FixMyStreet::App->model('DB::Comment'); + +my $comment = $comment_rs->new( + { + user_id => 1, + problem_id => 1, + text => '', + state => 'confirmed', + anonymous => 0, + mark_fixed => 0, + cobrand => 'default', + cobrand_data => '', + } +); + +is $comment->confirmed_local, undef, 'inflating null confirmed ok'; +is $comment->created_local, undef, 'inflating null confirmed ok'; diff --git a/t/app/model/problem.t b/t/app/model/problem.t new file mode 100644 index 000000000..74dd877ae --- /dev/null +++ b/t/app/model/problem.t @@ -0,0 +1,34 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More tests => 4; + +use FixMyStreet; +use FixMyStreet::App; + +my $problem_rs = FixMyStreet::App->model('DB::Problem'); + +my $problem = $problem_rs->new( + { + postcode => 'EH99 1SP', + latitude => 1, + longitude => 1, + areas => 1, + title => '', + detail => '', + used_map => 1, + user_id => 1, + name => '', + state => 'confirmed', + service => '', + cobrand => 'default', + cobrand_data => '', + } +); + +is $problem->confirmed_local, undef, 'inflating null confirmed ok'; +is $problem->whensent_local, undef, 'inflating null confirmed ok'; +is $problem->lastupdate_local, undef, 'inflating null confirmed ok'; +is $problem->created_local, undef, 'inflating null confirmed ok'; |