module GdsApi::TestHelpers::ContentApi

def content_api_licence_hash(licence_identifier, options = {})

def content_api_licence_hash(licence_identifier, options = {})
  details = {
    title: "Publisher title",
    slug: 'licence-slug',
    licence_short_description: "Short description of licence"
  }
  details.merge!(options)
  {
    "title" => details[:title],
    "id" => "http://example.org/#{details[:slug]}.json",
    "web_url" =>  "http://www.test.gov.uk/#{details[:slug]}",
    "format" => "licence",
    "details" => {
      "need_ids" => [],
      "business_proposition" => false,
      "alternative_title" => nil,
      "overview" => nil,
      "will_continue_on" => nil,
      "continuation_link" => nil,
      "licence_identifier" => licence_identifier,
      "licence_short_description" => details[:licence_short_description],
      "licence_overview" => nil,
      "updated_at" => "2012-10-06T12:00:05+01:00"
    },
    "tags" => [],
    "related" => []
  }
end