Sha256: aacae1ea81f0cca8544ef1b44a6a6b6dd423218d94e78af5639ba3f54c07afd0

Contents?: true

Size: 490 Bytes

Versions: 1

Compression:

Stored size: 490 Bytes

Contents

require 'test_helper'

class BlogTest < ActiveSupport::TestCase
  Blog.all.each do |blog|
    test "friendly slug filters out ##{blog.id} title" do
      assert_equal(TestAnswers::TWO_PARAM_ANSWERS[blog.id], blog.to_param)
    end
  end

  class Blog < ApplicationRecord
    build_friendly_slug :id, use: :first
  end

  Blog.all.each do |blog|
    test "friendly slug filters out ##{blog.id}" do
      assert_equal(TestAnswers::ONE_PARAM_ANSWERS[blog.id], blog.to_param)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
friendly_slug-0.1.6 friendly_slug_gem_test/test/models/blog_test.rb