Adding tests for Webhooks, updated Order tests #120

Merged
merged 3 commits into from Mar 10, 2014

Conversation

Projects
None yet
3 participants
@benjlcox
Member

benjlcox commented Mar 10, 2014

Adding tests for the Webhooks endpoint, updated Order tests that haven't been touched in 4 years

@pickle27

test/order_test.rb
- XML
+ test "create should create order" do
+ fake 'orders', :method => :post, :status => 201, :body => load_fixture('order')
+ order = ShopifyAPI::Order.create(line_items: [{quantity:1,variant_id:39072856}],financial_status:"authorized")

This comment has been minimized.

@maartenvg

maartenvg Mar 10, 2014

Member

Can you put spaces between the hash elements (after the comma)?

@maartenvg

maartenvg Mar 10, 2014

Member

Can you put spaces between the hash elements (after the comma)?

test/webhook_test.rb
+class WebhookTest < Test::Unit::TestCase
+ test 'create should create a webhook' do
+ fake 'webhooks', :method => :post, :status => 201, :body => load_fixture('webhook')
+ webhook = ShopifyAPI::Webhook.create(address: "http://www.yoloship.it/webhook",topic: "orders/create",format: "json")

This comment has been minimized.

@maartenvg

maartenvg Mar 10, 2014

Member

here too please.

@maartenvg

maartenvg Mar 10, 2014

Member

here too please.

@maartenvg

This comment has been minimized.

Show comment
Hide comment
@maartenvg

maartenvg Mar 10, 2014

Member

Looks good to me, just a little nitpick

Member

maartenvg commented Mar 10, 2014

Looks good to me, just a little nitpick

@kevinhughes27

This comment has been minimized.

Show comment
Hide comment
@kevinhughes27

kevinhughes27 Mar 10, 2014

Contributor

LGTM

Contributor

kevinhughes27 commented Mar 10, 2014

LGTM

benjlcox added a commit that referenced this pull request Mar 10, 2014

Merge pull request #120 from Shopify/add_more_tests
Adding tests for Webhooks, updated Order tests

@benjlcox benjlcox merged commit 298f9cd into master Mar 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment