mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 22:36:02 +01:00
Adds description field to custom queries (#9309).
Patch by Go MAEDA (@maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@22855 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -133,6 +133,7 @@ class QueriesController < ApplicationController
|
|||||||
@query.column_names = nil if params[:default_columns]
|
@query.column_names = nil if params[:default_columns]
|
||||||
@query.sort_criteria = (params[:query] && params[:query][:sort_criteria]) || @query.sort_criteria
|
@query.sort_criteria = (params[:query] && params[:query][:sort_criteria]) || @query.sort_criteria
|
||||||
@query.name = params[:query] && params[:query][:name]
|
@query.name = params[:query] && params[:query][:name]
|
||||||
|
@query.description = params[:query] && params[:query][:description]
|
||||||
if User.current.allowed_to?(:manage_public_queries, @query.project) || User.current.admin?
|
if User.current.allowed_to?(:manage_public_queries, @query.project) || User.current.admin?
|
||||||
@query.visibility = (params[:query] && params[:query][:visibility]) || Query::VISIBILITY_PRIVATE
|
@query.visibility = (params[:query] && params[:query][:visibility]) || Query::VISIBILITY_PRIVATE
|
||||||
@query.role_ids = params[:query] && params[:query][:role_ids]
|
@query.role_ids = params[:query] && params[:query][:role_ids]
|
||||||
|
|||||||
@@ -506,7 +506,8 @@ module QueriesHelper
|
|||||||
content_tag('li',
|
content_tag('li',
|
||||||
link_to(query.name,
|
link_to(query.name,
|
||||||
url_params.merge(:query_id => query),
|
url_params.merge(:query_id => query),
|
||||||
:class => css) +
|
:class => css,
|
||||||
|
:title => query.description) +
|
||||||
clear_link.html_safe)
|
clear_link.html_safe)
|
||||||
end.join("\n").html_safe,
|
end.join("\n").html_safe,
|
||||||
:class => 'queries'
|
:class => 'queries'
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ class Query < ApplicationRecord
|
|||||||
|
|
||||||
validates_presence_of :name
|
validates_presence_of :name
|
||||||
validates_length_of :name, :maximum => 255
|
validates_length_of :name, :maximum => 255
|
||||||
|
validates_length_of :description, :maximum => 255
|
||||||
validates :visibility, :inclusion => {:in => [VISIBILITY_PUBLIC, VISIBILITY_ROLES, VISIBILITY_PRIVATE]}
|
validates :visibility, :inclusion => {:in => [VISIBILITY_PUBLIC, VISIBILITY_ROLES, VISIBILITY_PRIVATE]}
|
||||||
validate :validate_query_filters
|
validate :validate_query_filters
|
||||||
validate do |query|
|
validate do |query|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%= @query.new_record? ? l(:label_project_plural) : @query.name %></h2>
|
<h2><%= @query.new_record? ? l(:label_project_plural) : @query.name %></h2>
|
||||||
|
<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
|
||||||
|
|
||||||
<%= form_tag(admin_projects_path(@project, nil), :method => :get, :id => 'query_form') do %>
|
<%= form_tag(admin_projects_path(@project, nil), :method => :get, :id => 'query_form') do %>
|
||||||
<%= hidden_field_tag 'admin_projects', '1' %>
|
<%= hidden_field_tag 'admin_projects', '1' %>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<h2><%= @query.new_record? ? l(:label_calendar) : @query.name %></h2>
|
<h2><%= @query.new_record? ? l(:label_calendar) : @query.name %></h2>
|
||||||
|
<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
|
||||||
|
|
||||||
<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
|
<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
|
||||||
:method => :get, :id => 'query_form') do %>
|
:method => :get, :id => 'query_form') do %>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%= @query.new_record? ? l(:label_gantt) : @query.name %></h2>
|
<h2><%= @query.new_record? ? l(:label_gantt) : @query.name %></h2>
|
||||||
|
<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
|
||||||
|
|
||||||
<%= form_tag({:controller => 'gantts', :action => 'show',
|
<%= form_tag({:controller => 'gantts', :action => 'show',
|
||||||
:project_id => @project, :month => params[:month],
|
:project_id => @project, :month => params[:month],
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
<h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2>
|
<h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2>
|
||||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||||
|
<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
|
||||||
|
|
||||||
<%= form_tag(_project_issues_path(@project), :method => :get, :id => 'query_form') do %>
|
<%= form_tag(_project_issues_path(@project), :method => :get, :id => 'query_form') do %>
|
||||||
<%= render :partial => 'queries/query_form' %>
|
<%= render :partial => 'queries/query_form' %>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%= @query.new_record? ? l(:label_project_plural) : @query.name %></h2>
|
<h2><%= @query.new_record? ? l(:label_project_plural) : @query.name %></h2>
|
||||||
|
<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
|
||||||
|
|
||||||
<%= form_tag(projects_path(@project, nil), :method => :get, :id => 'query_form') do %>
|
<%= form_tag(projects_path(@project, nil), :method => :get, :id => 'query_form') do %>
|
||||||
<%= render :partial => 'queries/query_form' %>
|
<%= render :partial => 'queries/query_form' %>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
<p><label for="query_name"><%=l(:field_name)%></label>
|
<p><label for="query_name"><%=l(:field_name)%></label>
|
||||||
<%= text_field 'query', 'name', :size => 80 %></p>
|
<%= text_field 'query', 'name', :size => 80 %></p>
|
||||||
|
<p><label for="query_description"><%=l(:field_description)%></label>
|
||||||
|
<%= text_field 'query', 'description', :size => 80 %></p>
|
||||||
|
|
||||||
<% if User.current.admin? ||
|
<% if User.current.admin? ||
|
||||||
User.current.allowed_to?(:manage_public_queries, @query.project) %>
|
User.current.allowed_to?(:manage_public_queries, @query.project) %>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%= @query.new_record? ? l(:label_spent_time) : @query.name %></h2>
|
<h2><%= @query.new_record? ? l(:label_spent_time) : @query.name %></h2>
|
||||||
|
<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
|
||||||
|
|
||||||
<%= form_tag(_time_entries_path(@project, nil), :method => :get, :id => 'query_form') do %>
|
<%= form_tag(_time_entries_path(@project, nil), :method => :get, :id => 'query_form') do %>
|
||||||
<%= render :partial => 'date_range' %>
|
<%= render :partial => 'date_range' %>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%= @query.new_record? ? l(:label_user_plural) : @query.name %></h2>
|
<h2><%= @query.new_record? ? l(:label_user_plural) : @query.name %></h2>
|
||||||
|
<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
|
||||||
|
|
||||||
<%= form_tag(users_path, method: :get, id: 'query_form') do %>
|
<%= form_tag(users_path, method: :get, id: 'query_form') do %>
|
||||||
<%= render partial: 'queries/query_form' %>
|
<%= render partial: 'queries/query_form' %>
|
||||||
|
|||||||
9
db/migrate/20240213101801_add_queries_description.rb
Normal file
9
db/migrate/20240213101801_add_queries_description.rb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
class AddQueriesDescription < ActiveRecord::Migration[6.1]
|
||||||
|
def up
|
||||||
|
add_column :queries, :description, :string, :after => :name
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :queries, :description
|
||||||
|
end
|
||||||
|
end
|
||||||
12
test/fixtures/queries.yml
vendored
12
test/fixtures/queries.yml
vendored
@@ -5,6 +5,7 @@ queries_001:
|
|||||||
project_id: 1
|
project_id: 1
|
||||||
visibility: 2
|
visibility: 2
|
||||||
name: Multiple custom fields query
|
name: Multiple custom fields query
|
||||||
|
description: Description for Multiple custom fields query
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
cf_1:
|
cf_1:
|
||||||
@@ -28,6 +29,7 @@ queries_002:
|
|||||||
project_id: 1
|
project_id: 1
|
||||||
visibility: 0
|
visibility: 0
|
||||||
name: Private query for cookbook
|
name: Private query for cookbook
|
||||||
|
description: Description for Private query for cookbook
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
tracker_id:
|
tracker_id:
|
||||||
@@ -47,6 +49,7 @@ queries_003:
|
|||||||
project_id:
|
project_id:
|
||||||
visibility: 0
|
visibility: 0
|
||||||
name: Private query for all projects
|
name: Private query for all projects
|
||||||
|
description: Description for Private query for all projects
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
tracker_id:
|
tracker_id:
|
||||||
@@ -62,6 +65,7 @@ queries_004:
|
|||||||
project_id:
|
project_id:
|
||||||
visibility: 2
|
visibility: 2
|
||||||
name: Public query for all projects
|
name: Public query for all projects
|
||||||
|
description: Description for Public query for all projects
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
tracker_id:
|
tracker_id:
|
||||||
@@ -77,6 +81,7 @@ queries_005:
|
|||||||
project_id:
|
project_id:
|
||||||
visibility: 2
|
visibility: 2
|
||||||
name: Open issues by priority and tracker
|
name: Open issues by priority and tracker
|
||||||
|
description: Description for Oepn issues by priority and tracker
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
status_id:
|
status_id:
|
||||||
@@ -98,6 +103,7 @@ queries_006:
|
|||||||
project_id:
|
project_id:
|
||||||
visibility: 2
|
visibility: 2
|
||||||
name: Open issues grouped by tracker
|
name: Open issues grouped by tracker
|
||||||
|
description: Description for Open issues grouped by tracker
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
status_id:
|
status_id:
|
||||||
@@ -118,6 +124,7 @@ queries_007:
|
|||||||
project_id: 2
|
project_id: 2
|
||||||
visibility: 2
|
visibility: 2
|
||||||
name: Public query for project 2
|
name: Public query for project 2
|
||||||
|
description: Description for Public query for project 2
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
tracker_id:
|
tracker_id:
|
||||||
@@ -133,6 +140,7 @@ queries_008:
|
|||||||
project_id: 2
|
project_id: 2
|
||||||
visibility: 0
|
visibility: 0
|
||||||
name: Private query for project 2
|
name: Private query for project 2
|
||||||
|
description: Description for Private query for project 2
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
tracker_id:
|
tracker_id:
|
||||||
@@ -148,6 +156,7 @@ queries_009:
|
|||||||
project_id:
|
project_id:
|
||||||
visibility: 2
|
visibility: 2
|
||||||
name: Open issues grouped by list custom field
|
name: Open issues grouped by list custom field
|
||||||
|
description: Description for Open issues grouped by list custom field
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
status_id:
|
status_id:
|
||||||
@@ -168,6 +177,7 @@ queries_010:
|
|||||||
project_id: 1
|
project_id: 1
|
||||||
visibility: 2
|
visibility: 2
|
||||||
name: My spent time
|
name: My spent time
|
||||||
|
description: Description for My spent time
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
user_id:
|
user_id:
|
||||||
@@ -187,6 +197,7 @@ queries_011:
|
|||||||
type: ProjectQuery
|
type: ProjectQuery
|
||||||
visibility: 2
|
visibility: 2
|
||||||
name: Projects as list
|
name: Projects as list
|
||||||
|
description: Description for Projects as list
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
id:
|
id:
|
||||||
@@ -205,6 +216,7 @@ queries_012:
|
|||||||
type: ProjectQuery
|
type: ProjectQuery
|
||||||
visibility: 1
|
visibility: 1
|
||||||
name: My bookmarks
|
name: My bookmarks
|
||||||
|
description: Description for My bookmarks
|
||||||
filters: |
|
filters: |
|
||||||
---
|
---
|
||||||
id:
|
id:
|
||||||
|
|||||||
@@ -155,15 +155,16 @@ class CalendarsControllerTest < Redmine::ControllerTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_show_should_run_custom_queries
|
def test_show_should_run_custom_queries
|
||||||
@query = IssueQuery.create!(:name => 'Calendar Query', :visibility => IssueQuery::VISIBILITY_PUBLIC)
|
query = IssueQuery.create!(:name => 'Calendar Query', :description => 'Description for Calendar Query', :visibility => IssueQuery::VISIBILITY_PUBLIC)
|
||||||
get(
|
get(
|
||||||
:show,
|
:show,
|
||||||
:params => {
|
:params => {
|
||||||
:query_id => @query.id
|
:query_id => query.id
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'h2', :text => 'Calendar Query'
|
assert_select 'h2', :text => query.name
|
||||||
|
assert_select '#sidebar a.query.selected[title=?]', query.description, :text => query.name
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_cross_project_calendar
|
def test_cross_project_calendar
|
||||||
|
|||||||
@@ -118,6 +118,19 @@ class GanttsControllerTest < Redmine::ControllerTest
|
|||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_show_should_run_custom_query
|
||||||
|
query = IssueQuery.create!(:name => 'Gantt Query', :description => 'Description for Gantt Query', :visibility => IssueQuery::VISIBILITY_PUBLIC)
|
||||||
|
get(
|
||||||
|
:show,
|
||||||
|
:params => {
|
||||||
|
:query_id => query.id
|
||||||
|
}
|
||||||
|
)
|
||||||
|
assert_response :success
|
||||||
|
assert_select 'h2', :text => query.name
|
||||||
|
assert_select '#sidebar a.query.selected[title=?]', query.description, :text => query.name
|
||||||
|
end
|
||||||
|
|
||||||
def test_gantt_should_work_cross_project
|
def test_gantt_should_work_cross_project
|
||||||
get :show
|
get :show
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|||||||
@@ -359,7 +359,8 @@ class IssuesControllerTest < Redmine::ControllerTest
|
|||||||
assert_select 'a.query.selected', 1
|
assert_select 'a.query.selected', 1
|
||||||
# assert link properties
|
# assert link properties
|
||||||
assert_select(
|
assert_select(
|
||||||
'a.query.selected[href=?]',
|
'a.query.selected[title=?][href=?]',
|
||||||
|
'Description for Oepn issues by priority and tracker',
|
||||||
'/projects/ecookbook/issues?query_id=5',
|
'/projects/ecookbook/issues?query_id=5',
|
||||||
:text => "Open issues by priority and tracker"
|
:text => "Open issues by priority and tracker"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -267,6 +267,14 @@ class ProjectsControllerTest < Redmine::ControllerTest
|
|||||||
assert_select 'tr#project-4 td.last_activity_date', :text => ''
|
assert_select 'tr#project-4 td.last_activity_date', :text => ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_index_with_query
|
||||||
|
query = ProjectQuery.find(11)
|
||||||
|
get :index, :params => { :query_id => query.id }
|
||||||
|
assert_response :success
|
||||||
|
assert_select 'h2', :text => query.name
|
||||||
|
assert_select '#sidebar a.query.selected[title=?]', query.description, :text => query.name
|
||||||
|
end
|
||||||
|
|
||||||
def test_index_should_retrieve_default_query
|
def test_index_should_retrieve_default_query
|
||||||
query = ProjectQuery.find(11)
|
query = ProjectQuery.find(11)
|
||||||
ProjectQuery.stubs(:default).returns query
|
ProjectQuery.stubs(:default).returns query
|
||||||
@@ -275,6 +283,7 @@ class ProjectsControllerTest < Redmine::ControllerTest
|
|||||||
@request.session[:user_id] = user_id
|
@request.session[:user_id] = user_id
|
||||||
get :index
|
get :index
|
||||||
assert_select 'h2', text: query.name
|
assert_select 'h2', text: query.name
|
||||||
|
assert_select '#sidebar a.query.selected[title=?]', query.description, :text => query.name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -328,6 +328,25 @@ class QueriesControllerTest < Redmine::ControllerTest
|
|||||||
assert_equal [['due_date', 'desc'], ['tracker', 'asc']], query.sort_criteria
|
assert_equal [['due_date', 'desc'], ['tracker', 'asc']], query.sort_criteria
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_create_with_description
|
||||||
|
@request.session[:user_id] = 2
|
||||||
|
assert_difference '::Query.count', 1 do
|
||||||
|
post(
|
||||||
|
:create,
|
||||||
|
:params => {
|
||||||
|
:project_id => 'ecookbook',
|
||||||
|
:query => {
|
||||||
|
:name => 'test_new_with_description', :description => 'Description for test_new_with_description'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
q = Query.find_by_name("test_new_with_description")
|
||||||
|
assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook', :query_id => q
|
||||||
|
|
||||||
|
assert_equal 'Description for test_new_with_description', q.description
|
||||||
|
end
|
||||||
|
|
||||||
def test_create_with_failure
|
def test_create_with_failure
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
assert_no_difference '::Query.count' do
|
assert_no_difference '::Query.count' do
|
||||||
@@ -659,6 +678,14 @@ class QueriesControllerTest < Redmine::ControllerTest
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_edit_description
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
get(:edit, :params => {:id => 5})
|
||||||
|
assert_response :success
|
||||||
|
|
||||||
|
assert_select 'input[name="query[description]"][value=?]', 'Description for Oepn issues by priority and tracker'
|
||||||
|
end
|
||||||
|
|
||||||
def test_edit_invalid_query
|
def test_edit_invalid_query
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
get(:edit, :params => {:id => 99})
|
get(:edit, :params => {:id => 99})
|
||||||
@@ -744,6 +771,23 @@ class QueriesControllerTest < Redmine::ControllerTest
|
|||||||
assert Query.find_by_name('test_project_query_updated')
|
assert Query.find_by_name('test_project_query_updated')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_update_description
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
q = Query.find(5)
|
||||||
|
put(
|
||||||
|
:update,
|
||||||
|
:params => {
|
||||||
|
:id => q.id,
|
||||||
|
:query => {
|
||||||
|
:name => q.name,
|
||||||
|
:description => 'query description updated'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
assert_redirected_to :controller => 'issues', :action => 'index', :query_id => q.id
|
||||||
|
assert_equal 'query description updated', Query.find(5).description
|
||||||
|
end
|
||||||
|
|
||||||
def test_update_with_failure
|
def test_update_with_failure
|
||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
put(
|
put(
|
||||||
|
|||||||
@@ -1682,14 +1682,14 @@ class TimelogControllerTest < Redmine::ControllerTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_index_with_query
|
def test_index_with_query
|
||||||
query = TimeEntryQuery.new(:project_id => 1, :name => 'Time Entry Query', :visibility => 2)
|
query = TimeEntryQuery.new(:project_id => 1, :name => 'Time Entry Query', :description => 'Description for Time Entry Query', :visibility => 2)
|
||||||
query.save!
|
query.save!
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
|
|
||||||
get :index, :params => {:project_id => 'ecookbook', :query_id => query.id}
|
get :index, :params => {:project_id => 'ecookbook', :query_id => query.id}
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_select 'h2', :text => query.name
|
assert_select 'h2', :text => query.name
|
||||||
assert_select '#sidebar a.selected', :text => query.name
|
assert_select '#sidebar a.query.selected[title=?]', query.description, :text => query.name
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_index_atom_feed
|
def test_index_atom_feed
|
||||||
|
|||||||
@@ -189,6 +189,15 @@ class UsersControllerTest < Redmine::ControllerTest
|
|||||||
assert_select 'tr#user-1', 1
|
assert_select 'tr#user-1', 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_index_with_query
|
||||||
|
query = UserQuery.create!(:name => 'My User Query', :description => 'Description for My User Query', :visibility => UserQuery::VISIBILITY_PUBLIC)
|
||||||
|
get :index, :params => { :query_id => query.id }
|
||||||
|
assert_response :success
|
||||||
|
|
||||||
|
assert_select 'h2', :text => query.name
|
||||||
|
assert_select '#sidebar a.query.selected[title=?]', query.description, :text => query.name
|
||||||
|
end
|
||||||
|
|
||||||
def test_index_csv
|
def test_index_csv
|
||||||
with_settings :default_language => 'en' do
|
with_settings :default_language => 'en' do
|
||||||
user = User.logged.status(1).first
|
user = User.logged.status(1).first
|
||||||
|
|||||||
Reference in New Issue
Block a user