Commit 8ecff858dd5a8744be5ea219008f16120c60ba1b
1 parent
01c15571
Exists in
master
and in
22 other branches
Copying slug when copying an article
(ActionItem1451)
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
app/models/article.rb
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') | ... | ... |