Commit 8ecff858dd5a8744be5ea219008f16120c60ba1b

Authored by Antonio Terceiro
1 parent 01c15571

Copying slug when copying an article

(ActionItem1451)
app/models/article.rb
... ... @@ -278,7 +278,6 @@ class Article < ActiveRecord::Base
278 278 :id,
279 279 :profile_id,
280 280 :parent_id,
281   - :slug,
282 281 :path,
283 282 :updated_at,
284 283 :created_at,
... ...
test/unit/article_test.rb
... ... @@ -571,6 +571,12 @@ class ArticleTest < Test::Unit::TestCase
571 571 assert_kind_of Folder, b
572 572 end
573 573  
  574 + should 'copy slug' do
  575 + a = fast_create(Article, :slug => 'slug123')
  576 + b = a.copy({})
  577 + assert_equal a.slug, b.slug
  578 + end
  579 +
574 580 should 'load article under an old path' do
575 581 p = create_user('test_user').person
576 582 a = p.articles.create(:name => 'old-name')
... ...