Sha256: 58dbdf925a9e8b3945729cb7221efd470070ef2a058409eaabfe6aef0a0347cb

Contents?: true

Size: 1.11 KB

Versions: 45

Compression:

Stored size: 1.11 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 do
      VCR.use_cassette("#{described_class.to_s}_application_create") do
        described_class.create(client, valid_attributes.merge(default_options))
      end
    end

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

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

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

Version data entries

45 entries across 45 versions & 1 rubygems

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