-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Subscription.all #25
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,17 @@ class SubscriptionTest < Test::Unit::TestCase | |
assert(subscription.is_a?(Subscription)) | ||
assert_equal(test_subscription[:id], subscription.id) | ||
end | ||
|
||
should 'be listable' do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
@mock.expects(:get).once.returns(test_response(test_subscription_list)) | ||
|
||
subscriptions = Subscription.all | ||
|
||
assert(subscriptions.is_a?(APIList)) | ||
subscriptions.each do |subscription| | ||
assert(subscription.is_a?(Subscription)) | ||
end | ||
end | ||
end | ||
|
||
context 'Subscription instance' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,13 @@ def test_subscription | |
:candidate_id=>"e44aa283528e6fde7d542194"} | ||
end | ||
|
||
def test_subscription_list | ||
{ | ||
:object => 'list', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the new Ruby 1.9 hash syntax. |
||
:data => [test_subscription, test_subscription, test_subscription] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the new Ruby 1.9 hash syntax. |
||
} | ||
end | ||
|
||
def test_geo | ||
{:id=>"e44aa283528e6fde7d542194", | ||
:object=>"geo", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [83/80]
Use the new Ruby 1.9 hash syntax.