mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-22 07:04:09 +01:00
Merge branch 'master' into 1.7_branch
* master: Added a fix for a failing functional test which concerned the javascript popup window to warn when a new context added in new action form. Fixed webrat/core.rb to solve problem with Ubuntu, as documented here: Corrected URL for testing documentation to Tracks community wiki.
This commit is contained in:
commit
c42cfc6e9f
5 changed files with 274 additions and 273 deletions
|
|
@ -40,6 +40,7 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
@contexts = current_user.contexts(true)
|
||||||
init_data_for_sidebar unless mobile?
|
init_data_for_sidebar unless mobile?
|
||||||
@projects = current_user.projects
|
@projects = current_user.projects
|
||||||
@page_title = "TRACKS::Project: #{@project.name}"
|
@page_title = "TRACKS::Project: #{@project.name}"
|
||||||
|
|
|
||||||
|
|
@ -27,17 +27,17 @@
|
||||||
:condition => "!$('todo_new_action_submit').isWaiting() && askIfNewContextProvided()") do -%>
|
:condition => "!$('todo_new_action_submit').isWaiting() && askIfNewContextProvided()") do -%>
|
||||||
|
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
function askIfNewContextProvided() {
|
function askIfNewContextProvided() {
|
||||||
var contexts = new Array(<%= @contexts.map{|c| '\'' + c.name + '\''}.join(", ") %>);
|
var contexts = new Array(<%= @contexts.map{|c| '\'' + c.name + '\''}.join(", ") %>);
|
||||||
var givenContextName = $('todo_context_name').value;
|
var givenContextName = $('todo_context_name').value;
|
||||||
if (givenContextName.length == 0) return true; // show rails validation error
|
if (givenContextName.length == 0) return true; // show rails validation error
|
||||||
for (var i = 0; i < contexts.length; ++i) {
|
for (var i = 0; i < contexts.length; ++i) {
|
||||||
if (contexts[i] == givenContextName) {
|
if (contexts[i] == givenContextName) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return confirm('New context "' + givenContextName + '" will be also created. Are you sure?');
|
return confirm('New context "' + givenContextName + '" will be also created. Are you sure?');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
<div id="status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
1. Wiki
|
1. Wiki
|
||||||
|
|
||||||
There are some pointers for setting up your Tracks copy for testing at http://dev.rousette.org.uk/wiki/Tracks/Testing
|
There are some pointers for setting up your Tracks copy for testing at http://www.rousette.org.uk/projects/wiki/Testing/
|
||||||
|
|
||||||
2. SQLITE3 FOR TESTING
|
2. SQLITE3 FOR TESTING
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,259 +1,259 @@
|
||||||
require File.dirname(__FILE__) + '/../test_helper'
|
require File.dirname(__FILE__) + '/../test_helper'
|
||||||
require File.dirname(__FILE__) + '/todo_container_controller_test_base'
|
require File.dirname(__FILE__) + '/todo_container_controller_test_base'
|
||||||
require 'projects_controller'
|
require 'projects_controller'
|
||||||
|
|
||||||
# Re-raise errors caught by the controller.
|
# Re-raise errors caught by the controller.
|
||||||
class ProjectsController; def rescue_action(e) raise e end; end
|
class ProjectsController; def rescue_action(e) raise e end; end
|
||||||
|
|
||||||
class ProjectsControllerTest < TodoContainerControllerTestBase
|
class ProjectsControllerTest < TodoContainerControllerTestBase
|
||||||
fixtures :users, :todos, :preferences, :projects, :contexts
|
fixtures :users, :todos, :preferences, :projects, :contexts
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
perform_setup(Project, ProjectsController)
|
perform_setup(Project, ProjectsController)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_projects_list
|
def test_projects_list
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
get :index
|
get :index
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_show_exposes_deferred_todos
|
def test_show_exposes_deferred_todos
|
||||||
p = projects(:timemachine)
|
p = projects(:timemachine)
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
get :show, :id => p.to_param
|
get :show, :id => p.to_param
|
||||||
assert_not_nil assigns['deferred']
|
assert_not_nil assigns['deferred']
|
||||||
assert_equal 1, assigns['deferred'].size
|
assert_equal 1, assigns['deferred'].size
|
||||||
|
|
||||||
t = p.not_done_todos[0]
|
t = p.not_done_todos[0]
|
||||||
t.show_from = 1.days.from_now.utc
|
t.show_from = 1.days.from_now.utc
|
||||||
t.save!
|
t.save!
|
||||||
|
|
||||||
get :show, :id => p.to_param
|
get :show, :id => p.to_param
|
||||||
assert_equal 2, assigns['deferred'].size
|
assert_equal 2, assigns['deferred'].size
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_show_exposes_next_project_in_same_state
|
def test_show_exposes_next_project_in_same_state
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
get :show, :id => projects(:timemachine).to_param
|
get :show, :id => projects(:timemachine).to_param
|
||||||
assert_equal(projects(:moremoney), assigns['next_project'])
|
assert_equal(projects(:moremoney), assigns['next_project'])
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_show_exposes_previous_project_in_same_state
|
def test_show_exposes_previous_project_in_same_state
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
get :show, :id => projects(:moremoney).to_param
|
get :show, :id => projects(:moremoney).to_param
|
||||||
assert_equal(projects(:timemachine), assigns['previous_project'])
|
assert_equal(projects(:timemachine), assigns['previous_project'])
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_create_project_via_ajax_increments_number_of_projects
|
def test_create_project_via_ajax_increments_number_of_projects
|
||||||
assert_ajax_create_increments_count 'My New Project'
|
assert_ajax_create_increments_count 'My New Project'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_create_project_with_ajax_success_rjs
|
def test_create_project_with_ajax_success_rjs
|
||||||
ajax_create 'My New Project'
|
ajax_create 'My New Project'
|
||||||
assert_rjs :insert_html, :bottom, "list-active-projects"
|
assert_rjs :insert_html, :bottom, "list-active-projects"
|
||||||
assert_rjs :sortable, 'list-active-projects', { :tag => 'div', :handle => 'handle', :complete => visual_effect(:highlight, 'list-active-projects'), :url => order_projects_path }
|
assert_rjs :sortable, 'list-active-projects', { :tag => 'div', :handle => 'handle', :complete => visual_effect(:highlight, 'list-active-projects'), :url => order_projects_path }
|
||||||
# not yet sure how to write the following properly...
|
# not yet sure how to write the following properly...
|
||||||
assert_rjs :call, "Form.reset", "project-form"
|
assert_rjs :call, "Form.reset", "project-form"
|
||||||
assert_rjs :call, "Form.focusFirstElement", "project-form"
|
assert_rjs :call, "Form.focusFirstElement", "project-form"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_create_project_and_go_to_project_page
|
def test_create_project_and_go_to_project_page
|
||||||
num_projects = Project.count
|
num_projects = Project.count
|
||||||
xhr :post, :create, { :project => {:name => 'Immediate Project Planning Required'}, :go_to_project => 1}
|
xhr :post, :create, { :project => {:name => 'Immediate Project Planning Required'}, :go_to_project => 1}
|
||||||
assert_js_redirected_to %r{/?projects/\d+}
|
assert_js_redirected_to %r{/?projects/\d+}
|
||||||
assert_equal num_projects + 1, Project.count
|
assert_equal num_projects + 1, Project.count
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_create_with_comma_in_name_does_not_increment_number_of_projects
|
def test_create_with_comma_in_name_does_not_increment_number_of_projects
|
||||||
assert_ajax_create_does_not_increment_count 'foo,bar'
|
assert_ajax_create_does_not_increment_count 'foo,bar'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_create_with_comma_in_name_fails_with_rjs
|
def test_create_with_comma_in_name_fails_with_rjs
|
||||||
ajax_create 'foo,bar'
|
ajax_create 'foo,bar'
|
||||||
assert_rjs :show, 'status'
|
assert_rjs :show, 'status'
|
||||||
# Not working with Rails 2.0 upgrade
|
# Not working with Rails 2.0 upgrade
|
||||||
# assert_rjs :update, 'status', "<div class=\"ErrorExplanation\" id=\"ErrorExplanation\"><h2>1 error prohibited this record from being saved</h2><p>There were problems with the following fields:</p><ul>Name cannot contain the comma (',') character</ul></div>"
|
# assert_rjs :update, 'status', "<div class=\"ErrorExplanation\" id=\"ErrorExplanation\"><h2>1 error prohibited this record from being saved</h2><p>There were problems with the following fields:</p><ul>Name cannot contain the comma (',') character</ul></div>"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_todo_state_is_project_hidden_after_hiding_project
|
def test_todo_state_is_project_hidden_after_hiding_project
|
||||||
p = projects(:timemachine)
|
p = projects(:timemachine)
|
||||||
todos = p.todos.find_in_state(:all, :active)
|
todos = p.todos.find_in_state(:all, :active)
|
||||||
login_as(:admin_user)
|
login_as(:admin_user)
|
||||||
xhr :post, :update, :id => 1, "project"=>{"name"=>p.name, "description"=>p.description, "state"=>"hidden"}
|
xhr :post, :update, :id => 1, "project"=>{"name"=>p.name, "description"=>p.description, "state"=>"hidden"}
|
||||||
todos.each do |t|
|
todos.each do |t|
|
||||||
assert_equal :project_hidden, t.reload().current_state
|
assert_equal :project_hidden, t.reload().current_state
|
||||||
end
|
end
|
||||||
assert p.reload().hidden?
|
assert p.reload().hidden?
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_not_done_counts_after_hiding_and_unhiding_project
|
def test_not_done_counts_after_hiding_and_unhiding_project
|
||||||
p = projects(:timemachine)
|
p = projects(:timemachine)
|
||||||
todos = p.todos.find_in_state(:all, :active)
|
todos = p.todos.find_in_state(:all, :active)
|
||||||
login_as(:admin_user)
|
login_as(:admin_user)
|
||||||
xhr :post, :update, :id => 1, "project"=>{"name"=>p.name, "description"=>p.description, "state"=>"hidden"}
|
xhr :post, :update, :id => 1, "project"=>{"name"=>p.name, "description"=>p.description, "state"=>"hidden"}
|
||||||
xhr :post, :update, :id => 1, "project"=>{"name"=>p.name, "description"=>p.description, "state"=>"active"}
|
xhr :post, :update, :id => 1, "project"=>{"name"=>p.name, "description"=>p.description, "state"=>"active"}
|
||||||
todos.each do |t|
|
todos.each do |t|
|
||||||
assert_equal :active, t.reload().current_state
|
assert_equal :active, t.reload().current_state
|
||||||
end
|
end
|
||||||
assert p.reload().active?
|
assert p.reload().active?
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_rss_feed_content
|
def test_rss_feed_content
|
||||||
login_as(:admin_user)
|
login_as(:admin_user)
|
||||||
get :index, { :format => "rss" }
|
get :index, { :format => "rss" }
|
||||||
assert_equal 'application/rss+xml', @response.content_type
|
assert_equal 'application/rss+xml', @response.content_type
|
||||||
#puts @response.body
|
#puts @response.body
|
||||||
|
|
||||||
assert_xml_select 'rss[version="2.0"]' do
|
assert_xml_select 'rss[version="2.0"]' do
|
||||||
assert_select 'channel' do
|
assert_select 'channel' do
|
||||||
assert_select '>title', 'Tracks Projects'
|
assert_select '>title', 'Tracks Projects'
|
||||||
assert_select '>description', "Lists all the projects for #{users(:admin_user).display_name}"
|
assert_select '>description', "Lists all the projects for #{users(:admin_user).display_name}"
|
||||||
assert_select 'language', 'en-us'
|
assert_select 'language', 'en-us'
|
||||||
assert_select 'ttl', '40'
|
assert_select 'ttl', '40'
|
||||||
end
|
end
|
||||||
assert_select 'item', 3 do
|
assert_select 'item', 3 do
|
||||||
assert_select 'title', /.+/
|
assert_select 'title', /.+/
|
||||||
assert_select 'description' do
|
assert_select 'description' do
|
||||||
assert_select_encoded do
|
assert_select_encoded do
|
||||||
assert_select 'p', /^\d+ actions\. Project is (active|hidden|completed)\.$/
|
assert_select 'p', /^\d+ actions\. Project is (active|hidden|completed)\.$/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
%w(guid link).each do |node|
|
%w(guid link).each do |node|
|
||||||
assert_select node, /http:\/\/test.host\/projects\/.+/
|
assert_select node, /http:\/\/test.host\/projects\/.+/
|
||||||
end
|
end
|
||||||
assert_select 'pubDate', projects(:timemachine).updated_at.to_s(:rfc822)
|
assert_select 'pubDate', projects(:timemachine).updated_at.to_s(:rfc822)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_rss_feed_not_accessible_to_anonymous_user_without_token
|
def test_rss_feed_not_accessible_to_anonymous_user_without_token
|
||||||
login_as nil
|
login_as nil
|
||||||
get :index, { :format => "rss" }
|
get :index, { :format => "rss" }
|
||||||
assert_response 401
|
assert_response 401
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_rss_feed_not_accessible_to_anonymous_user_with_invalid_token
|
def test_rss_feed_not_accessible_to_anonymous_user_with_invalid_token
|
||||||
login_as nil
|
login_as nil
|
||||||
get :index, { :format => "rss", :token => 'foo' }
|
get :index, { :format => "rss", :token => 'foo' }
|
||||||
assert_response 401
|
assert_response 401
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_rss_feed_accessible_to_anonymous_user_with_valid_token
|
def test_rss_feed_accessible_to_anonymous_user_with_valid_token
|
||||||
login_as nil
|
login_as nil
|
||||||
get :index, { :format => "rss", :token => users(:admin_user).token }
|
get :index, { :format => "rss", :token => users(:admin_user).token }
|
||||||
assert_response :ok
|
assert_response :ok
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_atom_feed_content
|
def test_atom_feed_content
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
get :index, { :format => "atom" }
|
get :index, { :format => "atom" }
|
||||||
assert_equal 'application/atom+xml', @response.content_type
|
assert_equal 'application/atom+xml', @response.content_type
|
||||||
#puts @response.body
|
#puts @response.body
|
||||||
|
|
||||||
assert_xml_select 'feed[xmlns="http://www.w3.org/2005/Atom"]' do
|
assert_xml_select 'feed[xmlns="http://www.w3.org/2005/Atom"]' do
|
||||||
assert_select '>title', 'Tracks Projects'
|
assert_select '>title', 'Tracks Projects'
|
||||||
assert_select '>subtitle', "Lists all the projects for #{users(:admin_user).display_name}"
|
assert_select '>subtitle', "Lists all the projects for #{users(:admin_user).display_name}"
|
||||||
assert_select 'entry', 3 do
|
assert_select 'entry', 3 do
|
||||||
assert_select 'title', /.+/
|
assert_select 'title', /.+/
|
||||||
assert_select 'content[type="html"]' do
|
assert_select 'content[type="html"]' do
|
||||||
assert_select_encoded do
|
assert_select_encoded do
|
||||||
assert_select 'p', /\d+ actions. Project is (active|hidden|completed)./
|
assert_select 'p', /\d+ actions. Project is (active|hidden|completed)./
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
assert_select 'published', /(#{Regexp.escape(projects(:timemachine).updated_at.xmlschema)}|#{Regexp.escape(projects(:moremoney).updated_at.xmlschema)})/
|
assert_select 'published', /(#{Regexp.escape(projects(:timemachine).updated_at.xmlschema)}|#{Regexp.escape(projects(:moremoney).updated_at.xmlschema)})/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_atom_feed_not_accessible_to_anonymous_user_without_token
|
def test_atom_feed_not_accessible_to_anonymous_user_without_token
|
||||||
login_as nil
|
login_as nil
|
||||||
get :index, { :format => "atom" }
|
get :index, { :format => "atom" }
|
||||||
assert_response 401
|
assert_response 401
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_atom_feed_not_accessible_to_anonymous_user_with_invalid_token
|
def test_atom_feed_not_accessible_to_anonymous_user_with_invalid_token
|
||||||
login_as nil
|
login_as nil
|
||||||
get :index, { :format => "atom", :token => 'foo' }
|
get :index, { :format => "atom", :token => 'foo' }
|
||||||
assert_response 401
|
assert_response 401
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_atom_feed_accessible_to_anonymous_user_with_valid_token
|
def test_atom_feed_accessible_to_anonymous_user_with_valid_token
|
||||||
login_as nil
|
login_as nil
|
||||||
get :index, { :format => "atom", :token => users(:admin_user).token }
|
get :index, { :format => "atom", :token => users(:admin_user).token }
|
||||||
assert_response :ok
|
assert_response :ok
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_text_feed_content
|
def test_text_feed_content
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
get :index, { :format => "txt" }
|
get :index, { :format => "txt" }
|
||||||
assert_equal 'text/plain', @response.content_type
|
assert_equal 'text/plain', @response.content_type
|
||||||
assert !(/ /.match(@response.body))
|
assert !(/ /.match(@response.body))
|
||||||
#puts @response.body
|
#puts @response.body
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_text_feed_content_for_projects_with_no_actions
|
def test_text_feed_content_for_projects_with_no_actions
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
p = projects(:timemachine)
|
p = projects(:timemachine)
|
||||||
p.todos.each { |t| t.destroy }
|
p.todos.each { |t| t.destroy }
|
||||||
|
|
||||||
get :index, { :format => "txt", :only_active_with_no_next_actions => true }
|
get :index, { :format => "txt", :only_active_with_no_next_actions => true }
|
||||||
assert (/^\s*BUILD A WORKING TIME MACHINE\s+0 actions. Project is active.\s*$/.match(@response.body))
|
assert (/^\s*BUILD A WORKING TIME MACHINE\s+0 actions. Project is active.\s*$/.match(@response.body))
|
||||||
assert !(/[1-9] actions/.match(@response.body))
|
assert !(/[1-9] actions/.match(@response.body))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_text_feed_not_accessible_to_anonymous_user_without_token
|
def test_text_feed_not_accessible_to_anonymous_user_without_token
|
||||||
login_as nil
|
login_as nil
|
||||||
get :index, { :format => "txt" }
|
get :index, { :format => "txt" }
|
||||||
assert_response 401
|
assert_response 401
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_text_feed_not_accessible_to_anonymous_user_with_invalid_token
|
def test_text_feed_not_accessible_to_anonymous_user_with_invalid_token
|
||||||
login_as nil
|
login_as nil
|
||||||
get :index, { :format => "txt", :token => 'foo' }
|
get :index, { :format => "txt", :token => 'foo' }
|
||||||
assert_response 401
|
assert_response 401
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_text_feed_accessible_to_anonymous_user_with_valid_token
|
def test_text_feed_accessible_to_anonymous_user_with_valid_token
|
||||||
login_as nil
|
login_as nil
|
||||||
get :index, { :format => "txt", :token => users(:admin_user).token }
|
get :index, { :format => "txt", :token => users(:admin_user).token }
|
||||||
assert_response :ok
|
assert_response :ok
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_actionize_sorts_active_projects_by_number_of_tasks
|
def test_actionize_sorts_active_projects_by_number_of_tasks
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
u = users(:admin_user)
|
u = users(:admin_user)
|
||||||
post :actionize, :state => "active", :format => 'js'
|
post :actionize, :state => "active", :format => 'js'
|
||||||
assert_equal 1, projects(:gardenclean).position
|
assert_equal 1, projects(:moremoney).position
|
||||||
assert_equal 2, projects(:moremoney).position
|
assert_equal 2, projects(:gardenclean).position
|
||||||
assert_equal 3, projects(:timemachine).position
|
assert_equal 3, projects(:timemachine).position
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_alphabetize_sorts_active_projects_alphabetically
|
def test_alphabetize_sorts_active_projects_alphabetically
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
u = users(:admin_user)
|
u = users(:admin_user)
|
||||||
post :alphabetize, :state => "active", :format => 'js'
|
post :alphabetize, :state => "active", :format => 'js'
|
||||||
assert_equal 1, projects(:timemachine).position
|
assert_equal 1, projects(:timemachine).position
|
||||||
assert_equal 2, projects(:gardenclean).position
|
assert_equal 2, projects(:gardenclean).position
|
||||||
assert_equal 3, projects(:moremoney).position
|
assert_equal 3, projects(:moremoney).position
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_alphabetize_assigns_state
|
def test_alphabetize_assigns_state
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
post :alphabetize, :state => "active", :format => 'js'
|
post :alphabetize, :state => "active", :format => 'js'
|
||||||
assert_equal "active", assigns['state']
|
assert_equal "active", assigns['state']
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_alphabetize_assigns_projects
|
def test_alphabetize_assigns_projects
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
post :alphabetize, :state => "active", :format => 'js'
|
post :alphabetize, :state => "active", :format => 'js'
|
||||||
exposed_projects = assigns['projects']
|
exposed_projects = assigns['projects']
|
||||||
assert_equal 3, exposed_projects.length
|
assert_equal 3, exposed_projects.length
|
||||||
assert_equal projects(:timemachine), exposed_projects[0]
|
assert_equal projects(:timemachine), exposed_projects[0]
|
||||||
assert_equal projects(:gardenclean), exposed_projects[1]
|
assert_equal projects(:gardenclean), exposed_projects[1]
|
||||||
assert_equal projects(:moremoney), exposed_projects[2]
|
assert_equal projects(:moremoney), exposed_projects[2]
|
||||||
end
|
end
|
||||||
|
|
||||||
def protect_against_forgery?
|
def protect_against_forgery?
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
4
vendor/plugins/webrat/lib/webrat/core.rb
vendored
4
vendor/plugins/webrat/lib/webrat/core.rb
vendored
|
|
@ -1,3 +1,3 @@
|
||||||
Dir[File.join(File.dirname(__FILE__), "core", "*.rb")].each do |file|
|
%w{field form label link logging page select_option session}.each do |file|
|
||||||
require File.expand_path(file)
|
require File.dirname(__FILE__) + "/core/#{file}"
|
||||||
end
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue