Sha256: af333b93ee2e5d68b9a2c4bff5fbe4f0e8dfe7d6562d6eb5a47f8f2b9b39eeb1

Contents?: true

Size: 1.16 KB

Versions: 35

Compression:

Stored size: 1.16 KB

Contents

require 'core/spec_helper'

describe ZendeskAPI::Macro, :delete_after do
  def valid_attributes
    { :title => "my test macro", :actions => [{ :field => "status", :value => "solved" }] }
  end

  it_should_be_readable :macros
  it_should_be_readable :macros, :active

  it_should_be_creatable
  it_should_be_updatable :actions, [{ "field" => "priority", "value" => "low" }]
  it_should_be_deletable

  describe "application", :vcr do
    subject { @object }

    before :all do
      VCR.use_cassette("#{described_class.to_s}_application_create") do
        @object = described_class.create(client, valid_attributes.merge(default_options))
      end
    end

    after :all do
      VCR.use_cassette("#{described_class.to_s}_application_delete") do
        @object.destroy
      end
    end

    describe "to a ticket" do
      it "should return a hash" do
        result = subject.apply(ticket)
        expect(result).to be_instance_of(Hashie::Mash)
        expect(result.ticket).to_not be_nil
      end
    end

    it "should be appliable" do
      result = subject.apply
      expect(result).to be_instance_of(Hashie::Mash)
      expect(result.ticket).to_not be_nil
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
zendesk_api-1.13.1 spec/live/macro_spec.rb
zendesk_api-1.12.1 spec/live/macro_spec.rb
zendesk_api-1.12.0 spec/live/macro_spec.rb
zendesk_api-1.11.7 spec/live/macro_spec.rb
zendesk_api-1.11.6 spec/live/macro_spec.rb
zendesk_api-1.11.5 spec/live/macro_spec.rb
zendesk_api-1.11.4 spec/live/macro_spec.rb
zendesk_api-1.11.3 spec/live/macro_spec.rb
zendesk_api-1.11.2 spec/live/macro_spec.rb
zendesk_api-1.11.1 spec/live/macro_spec.rb
zendesk_api-1.11.0 spec/live/macro_spec.rb
zendesk_api-1.10.0 spec/live/macro_spec.rb
zendesk_api-1.9.6 spec/live/macro_spec.rb
zendesk_api-1.9.5 spec/live/macro_spec.rb
zendesk_api-1.9.4 spec/live/macro_spec.rb
zendesk_api-1.9.3 spec/live/macro_spec.rb
zendesk_api-1.9.2 spec/live/macro_spec.rb
zendesk_api-1.9.1 spec/live/macro_spec.rb
zendesk_api-1.9.0 spec/live/macro_spec.rb
zendesk_api-1.8.0 spec/live/macro_spec.rb