Skip to content

Commit

Permalink
subscribe_response returns the whole response in error case
Browse files Browse the repository at this point in the history
  • Loading branch information
mdemin914 committed Oct 9, 2012
1 parent c0b5e7c commit 0931942
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/zuora/objects/subscribe_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def apply_response(response_hash, type)
return result
else
self.errors.add(:base, result[:errors][:message])
return false
return result
end
end

Expand Down
3 changes: 2 additions & 1 deletion spec/zuora/objects/subscribe_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@
it "handles applying subscribe failures messages" do
MockResponse.responds_with(:subscribe_request_failure) do
subject.should be_valid
subject.create.should == false
sub_resp = subject.create
sub_resp[:success].should == false
subject.errors[:base].should include('Initial Term should be greater than zero')
end
end
Expand Down

0 comments on commit 0931942

Please sign in to comment.