Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Net::OAuth is optional; ensure tests pass without it

Twitter API v1.1 requires OAuth, but Net::Twitter::Lite can be used for
Twitter API v1 compatible services that may not support or require
OAuth. So, keep it optional.

Closes issue #7.
  • Loading branch information...
commit ac64e51e61f312f7501d66d59f7bfcacf0e9aa4e 1 parent 6da1def
@semifor authored
Showing with 7 additions and 4 deletions.
  1. +4 −1 t/02_regression.t
  2. +3 −3 t/unicode.t
View
5 t/02_regression.t
@@ -42,7 +42,10 @@ $nt->credentials('barney','rubble');
$r = $nt->user_timeline;
like $request->header('Authorization'), qr/^Basic /, 'Basic Auth header';
-{
+SKIP: {
+ eval 'use Net::OAuth 0.25';
+ skip "Net::OAuth >= 0.25 required for this test", 1 if $@;
+
# NTL fails on methods using HTTP DELETE with OAuth (reported 2011-03-28)
my $nt = Net::Twitter::Lite->new(
consumer_key => 'key',
View
6 t/unicode.t
@@ -27,9 +27,9 @@ sub raw_sent_status {
sub sent_status { decode_utf8 raw_sent_status() }
my $nt = Net::Twitter::Lite->new(
- consumer_key => 'key',
- consumer_secret => 'secret',
- ua => $ua,
+ username => 'key',
+ password => 'secret',
+ ua => $ua,
legacy_lists_api => 0,
);
$nt->access_token('token');
Please sign in to comment.
Something went wrong with that request. Please try again.