mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-29 13:28:49 +01:00
fix all tests
This commit is contained in:
parent
f0ec5647d4
commit
632c0e7255
6 changed files with 11 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 -%>
|
||||
}
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue