Sha256: eb46ca67f792d8f40599d472d29fb88d204b89d49796fb2179fd63d31cab8ac1

Contents?: true

Size: 471 Bytes

Versions: 10

Compression:

Stored size: 471 Bytes

Contents

require 'spec_helper'

describe Redde::UrlGenerator do
  let(:url) { Redde::UrlGenerator.new(1, 'тестовый заголовок $%##@$@#$') }

  it 'generates valid translitted name' do
    expect(url.translitted_name).to eq 'testovyy-zagolovok'
  end

  it 'generates valid url if name not present' do
    url = Redde::UrlGenerator.new(1)
    expect(url.url).to eq '1'
  end

  it 'generates valid url' do
    expect(url.url).to eq '1-testovyy-zagolovok'
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
redde-0.1.18 spec/models/url_generator_spec.rb
redde-0.1.17 spec/models/url_generator_spec.rb
redde-0.1.16 spec/models/url_generator_spec.rb
redde-0.1.15 spec/models/url_generator_spec.rb
redde-0.1.14 spec/models/url_generator_spec.rb
redde-0.1.13 spec/models/url_generator_spec.rb
redde-0.1.12 spec/models/url_generator_spec.rb
redde-0.1.11 spec/models/url_generator_spec.rb
redde-0.1.10 spec/models/url_generator_spec.rb
redde-0.1.9 spec/models/url_generator_spec.rb