test/unit/test_permissions.rb in spontaneous-0.2.0.alpha7 vs test/unit/test_permissions.rb in spontaneous-0.2.0.beta1

- old
+ new

@@ -3,13 +3,15 @@ require File.expand_path('../../test_helper', __FILE__) class PermissionsTest < MiniTest::Spec + Permissions = Spontaneous::Permissions + def setup @site = setup_site - Spontaneous::Content.delete + ::Content.delete Permissions::UserLevel.reset! Permissions::UserLevel.stubs(:level_file).returns(File.expand_path('../../fixtures/permissions', __FILE__) / 'config/user_levels.yml') end def teardown @@ -232,18 +234,9 @@ should "require passwords to be at least 8 characters" do user = Permissions::User.new(@valid.merge(:password => "1234567")) user.save user.valid?.should be_false user.errors[:password].should_not be_blank - end - - - should "have a random salt" do - user1 = Permissions::User.create(@valid) - user2 = Permissions::User.create(@valid.merge(:login => "person2")) - user1.salt.should_not be_blank - user2.salt.should_not be_blank - user1.salt.should_not == user2.salt end context "who are valid" do setup do @user = Permissions::User.create(@valid)