Sha256: 31e88b5c722de3f542dcc4033d54a21e3e3554f82f4d3ddfeade7533d5b0e286

Contents?: true

Size: 726 Bytes

Versions: 55

Compression:

Stored size: 726 Bytes

Contents

class Zendesk2::Client
  class Real
    def create_forum(params={})
      request(
        :body   => {"forum" => params},
        :method => :post,
        :path   => "/forums.json",
      )
    end
  end # Real

  class Mock
    def create_forum(params={})
      identity = self.class.new_id

      record = {
        "id"         => identity,
        "url"        => url_for("/forums/#{identity}.json"),
        "created_at" => Time.now.iso8601,
        "updated_at" => Time.now.iso8601,
      }.merge(params)

      path = "/forums.json"
      self.data[:forums][identity]= record

      response(
        :method => :post,
        :body   => {"forum" => record},
        :path   => path,
      )
    end
  end # Mock
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
zendesk2-1.4.2 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.4.1 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.4.0 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.3.3 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.3.2 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.3.1 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.3.0 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.10 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.9 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.7 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.6 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.5 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.4 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.3 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.2 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.1 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.2.0 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.1.3 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.1.2 lib/zendesk2/client/requests/create_forum.rb
zendesk2-1.0.0 lib/zendesk2/client/requests/create_forum.rb