@@ -86,7 +86,6 end | |||
|
86 | 86 | |
|
87 | 87 | group :test do |
|
88 | 88 | gem "minitest" |
|
89 | gem "shoulda-context" | |
|
90 | 89 | gem "mocha", "~> 1.0.0", :require => 'mocha/api' |
|
91 | 90 | # For running UI tests |
|
92 | 91 | gem "capybara", "~> 2.1.0" |
@@ -15,7 +15,6 | |||
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | #require 'shoulda' | |
|
19 | 18 | ENV["RAILS_ENV"] = "test" |
|
20 | 19 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment") |
|
21 | 20 | require 'rails/test_help' |
@@ -34,9 +33,6 end | |||
|
34 | 33 | |
|
35 | 34 | class ActiveSupport::TestCase |
|
36 | 35 | include ActionDispatch::TestProcess |
|
37 | include Shoulda::Context::Assertions | |
|
38 | include Shoulda::Context::InstanceMethods | |
|
39 | extend Shoulda::Context::ClassMethods | |
|
40 | 36 | |
|
41 | 37 | self.use_transactional_fixtures = true |
|
42 | 38 | self.use_instantiated_fixtures = false |
@@ -328,7 +328,7 class MailHandlerTest < ActiveSupport::TestCase | |||
|
328 | 328 | ) |
|
329 | 329 | end |
|
330 | 330 | user = User.order('id DESC').first |
|
331 |
assert_ |
|
|
331 | assert_equal [group1, group2].sort, user.groups.sort | |
|
332 | 332 | end |
|
333 | 333 | |
|
334 | 334 | def test_created_user_should_not_receive_account_information_with_no_account_info_option |
@@ -481,7 +481,8 class ProjectTest < ActiveSupport::TestCase | |||
|
481 | 481 | project = Project.generate! |
|
482 | 482 | parent_version_1 = Version.generate!(:project => project) |
|
483 | 483 | parent_version_2 = Version.generate!(:project => project) |
|
484 |
assert_ |
|
|
484 | assert_equal [parent_version_1, parent_version_2].sort, | |
|
485 | project.rolled_up_versions.sort | |
|
485 | 486 | end |
|
486 | 487 | |
|
487 | 488 | test "#rolled_up_versions should include versions for a subproject" do |
@@ -491,11 +492,8 class ProjectTest < ActiveSupport::TestCase | |||
|
491 | 492 | subproject = Project.generate_with_parent!(project) |
|
492 | 493 | subproject_version = Version.generate!(:project => subproject) |
|
493 | 494 | |
|
494 | assert_same_elements [ | |
|
495 | parent_version_1, | |
|
496 | parent_version_2, | |
|
497 | subproject_version | |
|
498 | ], project.rolled_up_versions | |
|
495 | assert_equal [parent_version_1, parent_version_2, subproject_version].sort, | |
|
496 | project.rolled_up_versions.sort | |
|
499 | 497 | end |
|
500 | 498 | |
|
501 | 499 | test "#rolled_up_versions should include versions for a sub-subproject" do |
@@ -507,11 +505,8 class ProjectTest < ActiveSupport::TestCase | |||
|
507 | 505 | sub_subproject_version = Version.generate!(:project => sub_subproject) |
|
508 | 506 | project.reload |
|
509 | 507 | |
|
510 | assert_same_elements [ | |
|
511 | parent_version_1, | |
|
512 | parent_version_2, | |
|
513 | sub_subproject_version | |
|
514 | ], project.rolled_up_versions | |
|
508 | assert_equal [parent_version_1, parent_version_2, sub_subproject_version].sort, | |
|
509 | project.rolled_up_versions.sort | |
|
515 | 510 | end |
|
516 | 511 | |
|
517 | 512 | test "#rolled_up_versions should only check active projects" do |
@@ -524,7 +519,8 class ProjectTest < ActiveSupport::TestCase | |||
|
524 | 519 | project.reload |
|
525 | 520 | |
|
526 | 521 | assert !subproject.active? |
|
527 |
assert_ |
|
|
522 | assert_equal [parent_version_1, parent_version_2].sort, | |
|
523 | project.rolled_up_versions.sort | |
|
528 | 524 | end |
|
529 | 525 | |
|
530 | 526 | def test_shared_versions_none_sharing |
General Comments 0
You need to be logged in to leave comments.
Login now