Merge pull request #5177 from solgenomics/topic/solgs/refactor-solgs-pipeline
[sgn.git] / t / unit_fixture / CXGN / JSONProp.t
blobe3613fa1a81e3965486d26b2dc9bb048bc1ea0f5
2 use strict;
3 use Test::More;
5 use lib 't/lib';
7 use TestProp;
8 use Data::Dumper;
9 use SGN::Test::Fixture;
10 use SGN::Model::Cvterm;
11 use CXGN::JSONProp;
13 my $f = SGN::Test::Fixture->new();
15 my $jp = TestProp->new( { bcs_schema => $f->bcs_schema() });
17 is($jp->prop_table(), 'projectprop');
18 is($jp->prop_namespace(), 'Project::Projectprop');
19 is($jp->prop_type(), 'analysis_metadata_json');
20 is($jp->prop_primary_key(), 'projectprop_id');
22 $jp->info_field1("blabla");
23 $jp->info_field2("hello world");
24 $jp->parent_id(134);
26 my $prop_id = $jp->store();
28 my $prop_primary_key = $jp->prop_primary_key();
29 #my $prop_id = $jp->$prop_primary_id();
30 print STDERR "Retrieved prop_id $prop_id\n";
31 my $db_jp = TestProp->new( { bcs_schema => $f->bcs_schema(), prop_id => $prop_id });
33 is($db_jp->parent_id(), 134, "parent id test");
34 is($db_jp->info_field1(), "blabla", "info_field1 test");
35 is($db_jp->prop_type(), 'analysis_metadata_json', "analysis metadata test");
37 done_testing();