File tree Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -420,8 +420,6 @@ def set_association_from_options
420420 @collection_path ||= [ @resource ]
421421 end
422422
423- ## Fetch
424-
425423 def get_response ( path )
426424 @error = nil
427425 @response = @client . connection . send ( @verb || "get" , path ) do |req |
Original file line number Diff line number Diff line change @@ -203,7 +203,9 @@ def resource_path
203203
204204 has Category
205205
206+ class Vote < Resource ; end
206207 class Article < Resource
208+ has_many Vote
207209 end
208210
209211 has_many Article
@@ -215,6 +217,9 @@ def resource_path
215217 "help_center/articles"
216218 end
217219 end
220+
221+ class Vote < Resource ; end
222+ has_many Vote
218223 end
219224
220225 class TopicSubscription < Resource
Original file line number Diff line number Diff line change 11require 'core/spec_helper'
22
3- describe ZendeskAPI ::Article , :delete_after do
3+ RSpec . describe ZendeskAPI ::Article , :delete_after do
44 it "expects article to exist" do
55 expect ( article ) . not_to be_nil
66 end
@@ -34,6 +34,7 @@ def valid_attributes
3434
3535 expect ( actual . count ) . to be > 0
3636 expect ( actual . last . title ) . to eq ( "What are these sections and articles doing here?" )
37+ expect ( actual . last . votes . any? ) . to be ( true ) # Manually set in UI
3738 end
3839 end
3940 end
Original file line number Diff line number Diff line change 88 end
99
1010 it_should_be_readable topic , :subscriptions
11-
12- # TODO: This resource cannot be found since the response from the server
13- # is using `subscription` as the model name, instead of `topic_subscription`
14- # which is what the save handle_response method is expecting:
15- # https://github.com/zendesk/zendesk_api_client_rb/blob/master/lib/zendesk_api/actions.rb#L5
16- # we should modify it to use the `model_key` if present, but I don't want to do
17- # that now, when I modifying a lot of tests
18- xit "subscription can be found via the topic" do
19- VCR . use_cassette ( "find_created_topic_subscription" ) do
20- expect ( topic . subscriptions . find ( id : subscription . id ) ) . not_to be nil
21- end
22- end
2311end
You can’t perform that action at this time.
0 commit comments