Sha256: 06d96216936ef80950682a3a37a739355b8a4664507a983751ddfdcc558d52d6

Contents?: true

Size: 308 Bytes

Versions: 4

Compression:

Stored size: 308 Bytes

Contents

require "spec_helper"

describe Permalinker::Orm::ActiveRecord do
  let(:model) { Post }
  it_behaves_like "orm"

  it "overrides to_param method" do
    model.permalink :title

    record = model.create(:title => "Some nice post")
    expect(record.to_param).to eql("#{record.id}-some-nice-post")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
permalinker-1.0.3 spec/permalink/active_record_spec.rb
permalinker-1.0.2 spec/permalink/active_record_spec.rb
permalinker-1.0.1 spec/permalink/active_record_spec.rb
permalinker-1.0.0 spec/permalink/active_record_spec.rb