infomeme_client 0.1.4 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. metadata +26 -165
  2. data/.document +0 -5
  3. data/.gitignore +0 -21
  4. data/LICENSE +0 -20
  5. data/README.rdoc +0 -8
  6. data/Rakefile +0 -55
  7. data/VERSION +0 -1
  8. data/lib/infomeme_client.rb +0 -22
  9. data/lib/infomeme_client/base.rb +0 -77
  10. data/lib/infomeme_client/communication.rb +0 -75
  11. data/lib/infomeme_client/entity_hash.rb +0 -66
  12. data/lib/infomeme_client/entity_hash/comment.rb +0 -2
  13. data/lib/infomeme_client/entity_hash/invoice.rb +0 -2
  14. data/lib/infomeme_client/entity_hash/meme.rb +0 -45
  15. data/lib/infomeme_client/entity_hash/meme_type.rb +0 -2
  16. data/lib/infomeme_client/entity_hash/transaction.rb +0 -2
  17. data/lib/infomeme_client/entity_hash/user.rb +0 -2
  18. data/lib/infomeme_client/errors.rb +0 -22
  19. data/lib/infomeme_client/functions.rb +0 -16
  20. data/lib/infomeme_client/functions/meme.rb +0 -23
  21. data/lib/infomeme_client/functions/user.rb +0 -79
  22. data/lib/infomeme_client/functions/user_meme.rb +0 -127
  23. data/lib/infomeme_client/functions/user_order.rb +0 -31
  24. data/lib/infomeme_client/meme_application.rb +0 -18
  25. data/lib/infomeme_client/permissions.rb +0 -22
  26. data/lib/infomeme_client/response.rb +0 -52
  27. data/test/fixtures/memes/comments.json +0 -1
  28. data/test/fixtures/memes/meme.json +0 -1
  29. data/test/fixtures/memes/memes.json +0 -1
  30. data/test/fixtures/memes/types.json +0 -1
  31. data/test/fixtures/oauth/access_token.json +0 -1
  32. data/test/fixtures/oauth/authorize.json +0 -1
  33. data/test/fixtures/oauth/permissions.json +0 -1
  34. data/test/fixtures/oauth/request_token.json +0 -1
  35. data/test/fixtures/oauth/verify_access.json +0 -1
  36. data/test/fixtures/response/error.json +0 -1
  37. data/test/fixtures/response/ok.json +0 -1
  38. data/test/fixtures/response/test.json +0 -1
  39. data/test/fixtures/response/test_extract.json +0 -1
  40. data/test/fixtures/users/invoice.json +0 -1
  41. data/test/fixtures/users/invoices.json +0 -1
  42. data/test/fixtures/users/memes.json +0 -1
  43. data/test/fixtures/users/order_paypal.json +0 -1
  44. data/test/fixtures/users/permissions.json +0 -1
  45. data/test/fixtures/users/transactions.json +0 -1
  46. data/test/fixtures/users/user.json +0 -1
  47. data/test/fixtures/users/user_public.json +0 -1
  48. data/test/helper.rb +0 -69
  49. data/test/test_authorization.rb +0 -56
  50. data/test/test_communication.rb +0 -46
  51. data/test/test_entity_hash.rb +0 -15
  52. data/test/test_meme_functions.rb +0 -46
  53. data/test/test_permissions.rb +0 -25
  54. data/test/test_user_functions.rb +0 -15
  55. data/test/test_user_meme_functions.rb +0 -47
  56. data/test/test_user_order_functions.rb +0 -45
@@ -1,45 +0,0 @@
1
- require "helper"
2
-
3
- class TestUserOrderFunctions < Test::Unit::TestCase
4
- def test_order_with_balance
5
- fake_request(:post, "/users/test_user/memes/1/order", :body => fixture("response/ok"), :content_type => "application/json")
6
- authorize
7
- assert_nothing_raised do
8
- assert @im_client.order_with_balance(1)
9
- end
10
- end
11
-
12
- def test_order_with_paypal
13
- fake_request(:post, "/users/test_user/memes/1/order", :body => fixture("users/order_paypal"), :content_type => "application/json")
14
- authorize
15
- assert_nothing_raised do
16
- assert_equal "test_paypal_url", @im_client.order_with_paypal(1)
17
- end
18
- end
19
-
20
- def test_transactions
21
- fake_request(:get, "/users/test_user/transactions?page=1&pageSize=25", :body => fixture("users/transactions"), :content_type => "application/json")
22
- authorize
23
- check_paged :transactions, @im_client.transactions(:page => 1, :pageSize => 25, :no_extract => true)
24
- check_list :transactions, @im_client.transactions(:page => 1, :pageSize => 25)
25
- end
26
-
27
- def test_invoices
28
- fake_request(:get, "/users/test_user/invoices?page=1&pageSize=25", :body => fixture("users/invoices"), :content_type => "application/json")
29
- authorize
30
- check_paged :invoices, @im_client.invoices(:page => 1, :pageSize => 25, :no_extract => true)
31
- check_list :invoices, @im_client.invoices(:page => 1, :pageSize => 25)
32
- end
33
-
34
- def test_invoice
35
- fake_request(:get, "/users/test_user/invoices/1", :body => fixture("users/invoice"), :content_type => "application/json")
36
- authorize
37
- invoice = @im_client.invoice(1)
38
- check_eh :invoice, invoice
39
- assert_respond_to invoice, :amount_user
40
- assert_equal 10.0, invoice.amount_user
41
- assert_respond_to invoice, :meme
42
- assert_respond_to invoice.meme, :name
43
- assert_equal "test meme 1", invoice.meme.name
44
- end
45
- end