spec/model_key_spec.rb in gritano-0.5.4 vs spec/model_key_spec.rb in gritano-0.6.0

- old
+ new

@@ -28,11 +28,17 @@ it "should belongs to a user" do user, key = create_new_user_and_key key.user.should == user end - it "should generate the authorized_keys files" do + it "should generate the authorized_keys files if ssh's configurations is false" do create_new_user_and_key - Key.authorized_keys.should == "command=\"gritano-remote igor\" sshkey\n" + Key.authorized_keys.should == "command=\"gritano-remote igor\" sshkey\n\n" + end + + it "should not generate the authorized_keys files if ssh's configurations is true" do + user, key = create_new_user_and_key + Key.config = YAML::load(File.open(File.join('features', 'data', 'config_true.yml'))) + Key.authorized_keys.should == "" end end end \ No newline at end of file