Permalink
Browse files

Add a goal attribute and add some basic usage tests

  • Loading branch information...
1 parent 0a43466 commit c5bc197d64524eebb14fb978ebde4807a2e79b7d @leto leto committed Jun 29, 2012
Showing with 18 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 lib/WWW/Beeminder.pm
  3. +16 −0 t/01_basic.t
View
1 .gitignore
@@ -9,3 +9,4 @@ pm_to_blib
*.gz
.prove
inc/
+*.sw?
View
1 lib/WWW/Beeminder.pm
@@ -7,6 +7,7 @@ use namespace::autoclean;
has base_url => ( is => 'rw', isa => 'Str', default => 'https://www.beeminder.com' );
has username => ( is => 'rw', isa => 'Str', default => '' );
+has goal => ( is => 'rw', isa => 'Str', default => '' );
our $VERSION = '0.01';
View
16 t/01_basic.t
@@ -0,0 +1,16 @@
+#!perl
+
+use Test::More;
+use WWW::Beeminder;
+
+# curl -d "origin=bmndr_test&datapoints_text=26 42&sendmail=0"
+# http://beta.beeminder.com/dukeleto/goals/testing/datapoints/create_all
+
+my $bee = WWW::Beeminder->new(
+ username => 'dukeleto_api',
+ goal => 'testing',
+);
+
+isa_ok($bee, 'WWW::Beeminder');
+
+done_testing;

0 comments on commit c5bc197

Please sign in to comment.