diff options
| author | hukl <contact@smyck.org> | 2009-02-19 23:09:13 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-19 23:09:13 +0100 |
| commit | f2fadda259d17046d55b0144fba4b44748ff4a93 (patch) | |
| tree | 71c4df96b79407a47e66bf6486a6b2c90c6bc8c6 /test/unit/node_test.rb | |
| parent | 00001e5eebbb49030114397d95ec420956062ca6 (diff) | |
proper users - yippieh!
Diffstat (limited to 'test/unit/node_test.rb')
| -rw-r--r-- | test/unit/node_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/node_test.rb b/test/unit/node_test.rb index d4317ca..937c3e0 100644 --- a/test/unit/node_test.rb +++ b/test/unit/node_test.rb | |||
| @@ -7,8 +7,8 @@ class NodeTest < ActiveSupport::TestCase | |||
| 7 | @first_child = Node.find(2) | 7 | @first_child = Node.find(2) |
| 8 | @second_child = Node.find(3) | 8 | @second_child = Node.find(3) |
| 9 | 9 | ||
| 10 | @user1 = User.create :login => 'demo' | 10 | @user1 = User.create :login => 'demo', :email => "f@b.com", :password => 'foobar', :password_confirmation => 'foobar' |
| 11 | @user2 = User.create :login => 'show' | 11 | @user2 = User.create :login => 'show', :email => "f@b.com", :password => 'foobar', :password_confirmation => 'foobar' |
| 12 | end | 12 | end |
| 13 | 13 | ||
| 14 | def test_created_nodes_have_an_empty_draft_and_no_head | 14 | def test_created_nodes_have_an_empty_draft_and_no_head |
| @@ -50,9 +50,9 @@ class NodeTest < ActiveSupport::TestCase | |||
| 50 | node = Node.create :slug => "third_child" | 50 | node = Node.create :slug => "third_child" |
| 51 | node.move_to_child_of @root | 51 | node.move_to_child_of @root |
| 52 | node.publish_draft! | 52 | node.publish_draft! |
| 53 | 53 | ||
| 54 | node.find_or_create_draft @user1 | 54 | node.find_or_create_draft @user1 |
| 55 | 55 | ||
| 56 | assert_raise(RuntimeError) do | 56 | assert_raise(RuntimeError) do |
| 57 | node.find_or_create_draft @user2 | 57 | node.find_or_create_draft @user2 |
| 58 | end | 58 | end |
