Skip to content

Commit

Permalink
Fix start and finish commands
Browse files Browse the repository at this point in the history
  • Loading branch information
samrayner committed Apr 29, 2016
1 parent ceb74fd commit 2fcf896
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/sly/interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def update_item(id, attributes)

item_hash = item.to_flat_hash

#can't change type of item
#can't change type or product of item
item_hash.delete(:type)
item_hash.delete(:product)

self.connector.update_item(id, item_hash)
end
Expand Down
5 changes: 3 additions & 2 deletions spec/sly/interface_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,15 @@
})
end

it "does not try to update the type" do
it "does not try to update the type or product" do
expect(api.connector).to receive(:update_item).with(id, {
number: id,
score: "S",
tags: "tag1,tag2"
})
api.update_item(id, {
type: "story"
type: "story",
product: Sly::Product.new
})
end

Expand Down

0 comments on commit 2fcf896

Please sign in to comment.