diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb index ac92415b..7cb33f39 100644 --- a/app/controllers/login_controller.rb +++ b/app/controllers/login_controller.rb @@ -86,17 +86,8 @@ class LoginController < ApplicationController return unless should_expire_sessions? # Get expiry time (allow ten seconds window for the case where we have none) expiry_time = session['expiry_time'] || Time.now + 10 -<<<<<<< HEAD - @time_left = expiry_time - Time.now - if @time_left < (10*60) # Session will time out before the next check - @msg = 'login.session_time_out' - else - @msg = "" - end -======= time_left = expiry_time - Time.now @session_expired = ( time_left < (10*60) ) # Session will time out before the next check ->>>>>>> replace old prototype/jrails code for periodic checks and start work on autocomplete and edit projects end end respond_to do |format| diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index d1a8c9e2..1344772b 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -258,14 +258,15 @@ class ProjectsController < ApplicationController def render_rss_feed lambda do - render_rss_feed_for @projects, :feed => feed_options, - :item => { :title => :name, :description => lambda { |p| summary(p) } } + render_rss_feed_for current_user.projects, :feed => feed_options, + :title => :name, + :item => { :description => lambda { |p| summary(p) } } end end def render_atom_feed lambda do - render_atom_feed_for @projects, :feed => feed_options, + render_atom_feed_for current_user.projects, :feed => feed_options, :item => { :description => lambda { |p| summary(p) }, :title => :name, :author => lambda { |p| nil } } diff --git a/app/views/contexts/create.js.erb b/app/views/contexts/create.js.erb index 5e2fecda..44324309 100644 --- a/app/views/contexts/create.js.erb +++ b/app/views/contexts/create.js.erb @@ -8,12 +8,6 @@ TracksForm.show_errors(html_for_error_messages()); <% end -%> -/* -if @saved - container_name = 'list-contexts-' + (@context.hidden? ? 'hidden' : 'active') - page.insert_html :bottom, container_name, :partial => 'context_listing', :locals => { :context_listing => @context } -*/ - function hide_empty_message() { $('contexts-empty-nd').hide(); } diff --git a/features/context_list.feature b/features/context_list.feature index cd8b2bd0..3de7712c 100644 --- a/features/context_list.feature +++ b/features/context_list.feature @@ -70,3 +70,9 @@ Feature: Manage the list of contexts | state | name | | active | @phone | | hidden | @hidden| + + @selenium @wip + Scenario: Cannot add a context with comma in the name + When I go to the contexts page + And I add a new active context "foo, bar" + Then I should see "Name cannot contain the comma" \ No newline at end of file diff --git a/features/project_list.feature b/features/project_list.feature index 48a3dc49..30dffdea 100644 --- a/features/project_list.feature +++ b/features/project_list.feature @@ -108,3 +108,8 @@ Feature: Manage the list of projects When I sort the list by number of tasks Then the project "very busy" should be above the project "test" + @selenium @wip + Scenario: Cannot add a project with comma in the name + When I go to the projects page + And I submit a new project with name "foo,bar" + Then I should see "Name cannot contain the comma" \ No newline at end of file diff --git a/test/functional/contexts_controller_test.rb b/test/functional/contexts_controller_test.rb index fa4cd36f..eba1c104 100644 --- a/test/functional/contexts_controller_test.rb +++ b/test/functional/contexts_controller_test.rb @@ -26,13 +26,6 @@ class ContextsControllerTest < TodoContainerControllerTestBase assert_ajax_create_does_not_increment_count 'foo,bar' end - def test_create_with_comma_in_name_fails_with_rjs - ajax_create 'foo,bar' - assert_rjs :show, 'status' -# Not working with Rails 2.0 upgrade -# assert_rjs :update, 'status', "

1 error prohibited this record from being saved

There were problems with the following fields:

" - end - def test_rss_feed_content login_as :admin_user get :index, { :format => "rss" } diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index b1cf6154..28c753d5 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -59,13 +59,6 @@ class ProjectsControllerTest < TodoContainerControllerTestBase assert_ajax_create_does_not_increment_count 'foo,bar' end - def test_create_with_comma_in_name_fails_with_rjs - ajax_create 'foo,bar' - assert_rjs :show, 'status' - # Not working with Rails 2.0 upgrade - # assert_rjs :update, 'status', "

1 error prohibited this record from being saved

There were problems with the following fields:

" - end - def test_todo_state_is_project_hidden_after_hiding_project p = projects(:timemachine) todos = p.todos.find_in_state(:all, :active) @@ -214,8 +207,8 @@ class ProjectsControllerTest < TodoContainerControllerTestBase login_as :admin_user u = users(:admin_user) post :actionize, :state => "active", :format => 'js' - assert_equal 1, projects(:moremoney).position - assert_equal 2, projects(:gardenclean).position + assert_equal 1, projects(:gardenclean).position + assert_equal 2, projects(:moremoney).position assert_equal 3, projects(:timemachine).position end