live/ticket_spec.rb in zendesk_api-0.1.2 vs live/ticket_spec.rb in zendesk_api-0.1.3

- old
+ new

@@ -1,26 +1,27 @@ require 'spec_helper' describe ZendeskAPI::Ticket do def valid_attributes - { + { :type => "question", :subject => "This is a question?", :comment => { :value => "Indeed it is!" }, :priority => "normal", :requester_id => user.id, - :submitter_id => user.id + :submitter_id => user.id, + :collaborator_ids => [agent.id] } end it_should_be_creatable it_should_be_updatable :subject it_should_be_deletable it_should_be_readable :tickets it_should_be_readable :tickets, :recent it_should_be_readable user, :requested_tickets - it_should_be_readable user, :ccd_tickets + it_should_be_readable agent, :ccd_tickets it_should_be_readable organization, :tickets describe ".incremental_export" do let(:results){ ZendeskAPI::Ticket.incremental_export(client, Time.at(1023059503)) } # ~ 10 years ago @@ -37,10 +38,10 @@ results.to_a.first.should be_an_instance_of ZendeskAPI::Ticket end it "is able to do next" do first = results.to_a.first - recent_url = "api/v2/exports/tickets.json?start_time=#{Time.now.to_i.to_s[0..5]}" + recent_url = "api/v2/exports/tickets.json\\?start_time=#{Time.now.to_i.to_s[0..5]}" stub_json_request(:get, /#{recent_url}/, json(:results => [])) results.next results.first.should_not == first end