Sha256: 7156bd5525064536d500029b0420272ca7a74cba6f8685045d5d8932b9cb2cb7

Contents?: true

Size: 766 Bytes

Versions: 20

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 nonexistant 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

20 entries across 20 versions & 1 rubygems

Version Path
zendesk_api-0.3.14 spec/core/search_spec.rb
zendesk_api-0.3.13 spec/core/search_spec.rb
zendesk_api-0.3.12 spec/core/search_spec.rb
zendesk_api-0.3.11 spec/core/search_spec.rb
zendesk_api-0.3.10 spec/core/search_spec.rb
zendesk_api-0.3.9 spec/core/search_spec.rb
zendesk_api-0.3.8 spec/core/search_spec.rb
zendesk_api-0.3.7 spec/core/search_spec.rb
zendesk_api-0.3.6 spec/core/search_spec.rb
zendesk_api-0.3.5 spec/core/search_spec.rb
zendesk_api-0.3.4 spec/core/search_spec.rb
zendesk_api-0.3.3 spec/core/search_spec.rb
zendesk_api-0.3.2 spec/core/search_spec.rb
zendesk_api-0.3.1 spec/core/search_spec.rb
zendesk_api-0.3.0 spec/core/search_spec.rb
zendesk_api-0.2.6 spec/core/search_spec.rb
zendesk_api-0.2.5 spec/core/search_spec.rb
zendesk_api-0.2.4 spec/core/search_spec.rb
zendesk_api-0.2.2 spec/core/search_spec.rb
zendesk_api-0.2.1 spec/core/search_spec.rb