Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mgroups: Add simple tests

  • Loading branch information...
commit 3bc99918b165c3cc2af33b38b0843409570f8957 1 parent 475eab7
@icy icy authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 test/test_process.rb
View
16 test/test_process.rb
@@ -72,6 +72,22 @@ def test_valid_should_return_false_if_gid_does_not_exists
assert !@p.valid?
end
+ def test_valid_should_return_true_if_gids_exists
+ @p.start = 'qux'
+ @p.log = '/tmp/foo.log'
+ @p.gids = %w{wheel root}
+
+ assert @p.valid?
+ end
+
+ def test_valid_should_return_false_if_gids_does_not_exists
+ @p.start = 'qux'
+ @p.log = '/tmp/foo.log'
+ @p.gids = %w{foobarbaz root}
+
+ assert !@p.valid?
+ end
+
def test_valid_should_return_true_if_dir_exists
@p.start = 'qux'
@p.log = '/tmp/foo.log'
Please sign in to comment.
Something went wrong with that request. Please try again.