Merge pull request #1819 from C-Otto/cleanup

Cleanup
This commit is contained in:
Dan Rice 2015-06-16 20:47:44 -04:00
commit 2c36e22a18
5 changed files with 4 additions and 4 deletions

View file

@ -231,6 +231,7 @@ class ProjectsController < ApplicationController
elsif boolean_param('update_default_tags')
template = 'projects/update_default_tags'
elsif boolean_param('update_project_name')
# clicking on a project name in the project view gives a form triggering this
@projects = current_user.projects
template = 'projects/update_project_name'
else

View file

@ -28,7 +28,6 @@ var <%=object_name%> = {
<% end -%>
ProjectListPage.update_all_states_count(<%=@active_projects_count%>, <%=@hidden_projects_count%>, <%=@completed_projects_count%>);
ProjectListPage.show_or_hide_all_state_containers(<%= @show_active_projects %>, <%= @show_hidden_projects %>, <%= @show_completed_projects %>);
TracksForm.set_project_name_and_default_project_name("<%= escape_javascript(@project.name)%>");
$('div.project-edit-current').removeClass('project-edit-current');
},
update_project_page: function() {

View file

@ -33,4 +33,4 @@ Feature: Add a todo to Tracks on console
"""
When I execute the add-todo script
Then I should have 2 todo in project "Project A"
Then I should have 2 todos in project "Project A"

View file

@ -306,7 +306,7 @@ Then /^I should have a project called "([^"]*)"$/ do |project_name|
expect(project).to_not be_nil
end
Then /^I should have (\d+) todo in project "([^"]*)"$/ do |todo_count, project_name|
Then /^I should have (\d+) todos? in project "([^"]*)"$/ do |todo_count, project_name|
project = @current_user.projects.where(:name => project_name).first
expect(project).to_not be_nil
expect(project.todos.count).to eq(todo_count.to_i)

View file

@ -116,7 +116,7 @@ end
Then /^the project field of the new todo form should contain "([^"]*)"$/ do |project_name|
xpath= "//form[@id='todo-form-new-action']/input[@id='todo_project_name']"
expect(project_name).to eq(page.find(:xpath, xpath).value)
expect(page.find(:xpath, xpath).value).to eq(project_name)
end
Then /^the default context of the new todo form should be "([^"]*)"$/ do |context_name|