Sha256: 91269addbcc31f3b4e6dc5796eeea5a9389fbb29ac0bfbe37ceb1add046fd362

Contents?: true

Size: 766 Bytes

Versions: 36

Compression:

Stored size: 766 Bytes

Contents

require 'core/spec_helper'

describe ZendeskAPI::Search do
  context ".new" do
    context "when given an existing class" do
      it "should return the correct class" do
        ZendeskAPI::Search.new(nil, { "result_type" => "user" }).should be_instance_of(ZendeskAPI::User)
      end
    end

    context "when given a nonexistent class" do
      it "should return an object of the type Search::Result" do
        ZendeskAPI::Search.new(nil, { "result_type" => "blah" }).should be_instance_of(ZendeskAPI::Search::Result)
      end
    end

    context "when not given anything" do
      it "should return an object of the type Search::Result" do
        ZendeskAPI::Search.new(nil, {}).should be_instance_of(ZendeskAPI::Search::Result)
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
zendesk_api-1.3.9 spec/core/search_spec.rb
zendesk_api-1.3.8 spec/core/search_spec.rb
zendesk_api-1.3.7 spec/core/search_spec.rb
zendesk_api-1.2.10 spec/core/search_spec.rb
zendesk_api-1.2.9 spec/core/search_spec.rb
zendesk_api-1.2.8 spec/core/search_spec.rb
zendesk_api-1.3.5 spec/core/search_spec.rb
zendesk_api-1.2.7 spec/core/search_spec.rb
zendesk_api-1.3.4 spec/core/search_spec.rb
zendesk_api-1.3.2 spec/core/search_spec.rb
zendesk_api-1.3.1 spec/core/search_spec.rb
zendesk_api-1.3.0 spec/core/search_spec.rb
zendesk_api-1.3.0.rc3 spec/core/search_spec.rb
zendesk_api-1.2.6 spec/core/search_spec.rb
zendesk_api-1.3.0.rc2 spec/core/search_spec.rb
zendesk_api-1.3.0.rc1 spec/core/search_spec.rb
zendesk_api-1.2.5 spec/core/search_spec.rb
zendesk_api-1.2.4 spec/core/search_spec.rb
zendesk_api-1.2.3 spec/core/search_spec.rb
zendesk_api-1.2.2 spec/core/search_spec.rb