partial revert of e540a1fa72e4a5425c59a9397a3353f4784d726a -- fixes RT#44641 (plus...
[catagits/Catalyst-Action-REST.git] / t / catalyst-controller-rest.t
diff --git a/t/catalyst-controller-rest.t b/t/catalyst-controller-rest.t
new file mode 100644 (file)
index 0000000..0d1d4eb
--- /dev/null
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+use Test::More tests => 2;
+use YAML::Syck;
+use FindBin;
+
+use lib ("$FindBin::Bin/lib", "$FindBin::Bin/../lib", "$FindBin::Bin/broken");
+use Test::Rest;
+
+my $t = Test::Rest->new(content_type => 'text/x-yaml');
+
+use_ok 'Catalyst::Test', 'Test::Catalyst::Action::REST';
+
+my $data = { your => 'face' };
+is_deeply(
+  Load(
+    request($t->put(url => '/rest/test', data => Dump($data)))->content
+  ),
+  { test => 'worked', data => $data },
+  'round trip (deserialize/serialize)',
+);