Converted Project#copy test to use shoulda
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2931 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
35333367df
commit
548d5a21f6
|
@ -290,8 +290,9 @@ class ProjectTest < ActiveSupport::TestCase
|
||||||
assert_equal 1, copied_project.status
|
assert_equal 1, copied_project.status
|
||||||
end
|
end
|
||||||
|
|
||||||
# Context: Project#copy
|
context "#copy" do
|
||||||
def test_copy_should_copy_issues
|
|
||||||
|
should "copy issues" do
|
||||||
# Setup
|
# Setup
|
||||||
ProjectCustomField.destroy_all # Custom values are a mess to isolate in tests
|
ProjectCustomField.destroy_all # Custom values are a mess to isolate in tests
|
||||||
source_project = Project.find(2)
|
source_project = Project.find(2)
|
||||||
|
@ -312,7 +313,7 @@ class ProjectTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_should_copy_members
|
should "copy members" do
|
||||||
# Setup
|
# Setup
|
||||||
ProjectCustomField.destroy_all # Custom values are a mess to isolate in tests
|
ProjectCustomField.destroy_all # Custom values are a mess to isolate in tests
|
||||||
source_project = Project.find(2)
|
source_project = Project.find(2)
|
||||||
|
@ -332,7 +333,7 @@ class ProjectTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_should_copy_project_level_queries
|
should "copy project specific queries" do
|
||||||
# Setup
|
# Setup
|
||||||
ProjectCustomField.destroy_all # Custom values are a mess to isolate in tests
|
ProjectCustomField.destroy_all # Custom values are a mess to isolate in tests
|
||||||
source_project = Project.find(2)
|
source_project = Project.find(2)
|
||||||
|
@ -353,3 +354,5 @@ class ProjectTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue