test/unit/version_test.rb in zena-1.0.0.beta3 vs test/unit/version_test.rb in zena-1.0.0.rc1
- old
+ new
@@ -9,12 +9,12 @@
subject do
versions(:status_en)
end
context 'receiving author' do
- should 'return a BaseContact' do
- assert_kind_of BaseContact, subject.author
+ should 'return a Node' do
+ assert_kind_of Node, subject.author
end
should 'return the contact node of the author' do
assert_equal nodes_id(:ant), subject.author[:id]
end
@@ -56,11 +56,11 @@
end # a redaction
context 'on node creation' do
context 'setting an invalid v_lang' do
setup do
- @node = secure!(Page) { Page.create(:v_lang => 'io', :parent_id => nodes_id(:status), :node_name => 'hello')}
+ @node = secure!(Page) { Page.create(:v_lang => 'io', :parent_id => nodes_id(:status), :title => 'hello')}
end
should 'not create record if lang is not allowed' do
assert @node.new_record?
end
@@ -70,10 +70,10 @@
end
end
context 'setting a valid v_lang' do
subject do
- @node = secure!(Page) { Page.create(:v_lang => 'de', :parent_id => nodes_id(:status), :node_name => 'hello')}
+ @node = secure!(Page) { Page.create(:v_lang => 'de', :parent_id => nodes_id(:status), :title => 'hello')}
end
should 'create a single version' do
assert_difference('Version.count', 1) do
subject