diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 70d5847a..9c9abd8f 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -160,7 +160,7 @@ module TodosHelper if (['project', 'tag', 'stats', 'search'].include?(parent_container_type)) str << item_link_to_context( todo ) end - if (['context', 'tickler', 'tag', 'stats', 'search'].include?(parent_container_type)) && @todo.project_id + if (['context', 'tickler', 'tag', 'stats', 'search'].include?(parent_container_type)) && todo.project_id str << item_link_to_project( todo ) end end diff --git a/app/views/todos/update.js.erb b/app/views/todos/update.js.erb index f7813960..adb412b3 100644 --- a/app/views/todos/update.js.erb +++ b/app/views/todos/update.js.erb @@ -110,9 +110,11 @@ function update_predecessors() { $('#<%=dom_id(p)%>').html('<%=escape_javascript(render(:partial => p, :locals => { :parent_container_type => parent_container_type }))%>'); } <% end -%> - <% @removed_predecessors.each do |p| -%> - if ($('#<%=item_container_id(p)%>')) { - $('#<%=dom_id(p)%>').html('<%=escape_javascript(render(:partial => p, :locals => { :parent_container_type => parent_container_type }))%>'); - } + <% if @removed_predecessors + @removed_predecessors.each do |p| -%> + if ($('#<%=item_container_id(p)%>')) { + $('#<%=dom_id(p)%>').html('<%=escape_javascript(render(:partial => p, :locals => { :parent_container_type => parent_container_type }))%>'); + } + <% end -%> <% end -%> } \ No newline at end of file diff --git a/config/environments/test.rb b/config/environments/test.rb index b57e2069..62e5b507 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -41,4 +41,4 @@ config.gem "hpricot" config.gem "hoe" config.gem 'webrat', :lib => false, :version => '>=0.7.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat')) config.gem 'rspec-rails', :lib => false, :version => '<2.1.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails')) -config.gem "factory_girl", :lib => "factory_girl", :source => "http://gems.github.com" +config.gem "thoughtbot-factory_girl", :lib => "factory_girl", :source => "http://gems.github.com" diff --git a/features/shared_add_new_todo.feature b/features/shared_add_new_todo.feature index 5d7b37ba..e62b4edf 100644 --- a/features/shared_add_new_todo.feature +++ b/features/shared_add_new_todo.feature @@ -200,6 +200,7 @@ Feature: Add new next action from every page """ + Then a confirmation for adding a new context "@anywhere" should be asked Then I should see "@anywhere" And I should see "a" And I should see "b" diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index e20d9095..42aae5bc 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -54,7 +54,6 @@ class UsersControllerTest < ActionController::TestCase @no_users_before = User.find(:all).size user_id = users(:ldap_user).id xhr :post, :destroy, :id => user_id.to_param - assert_rjs :page, "user-#{user_id}", :remove assert_equal @no_users_before-1, User.find(:all).size end diff --git a/test/unit/todo_test.rb b/test/unit/todo_test.rb index d4025233..e72790e4 100644 --- a/test/unit/todo_test.rb +++ b/test/unit/todo_test.rb @@ -195,12 +195,12 @@ class TodoTest < ActiveSupport::TestCase def test_todo_specification_handles_null_project # @not_completed1 has a project todo_desc = @not_completed1.description - assert_equal "\"#{todo_desc}\" <\"agenda\"; \"Make more money than Billy Gates\">", @not_completed1.specification + assert_equal "'#{todo_desc}' <'agenda'; 'Make more money than Billy Gates'>", @not_completed1.specification # now check on null @not_completed1.project = nil @not_completed1.save - assert_equal "\"#{todo_desc}\" <\"agenda\"; \"(none)\">", @not_completed1.specification + assert_equal "'#{todo_desc}' <'agenda'; '(none)'>", @not_completed1.specification end def test_todo_from_specification_should_return_todo