リビジョン fa764aa1
| test/fixtures/terms.yml | ||
|---|---|---|
|
author_id: 3
|
||
|
updater_id: 3
|
||
|
name: term one
|
||
|
name_en:
|
||
|
codename:
|
||
|
name_en: ''
|
||
|
codename: ''
|
||
|
datatype: ''
|
||
|
description:
|
||
|
created_on: 2010-12-13 21:25:16
|
||
|
updated_on: 2010-12-13 21:25:16
|
||
| ... | ... | |
|
author_id: 2
|
||
|
updater_id: 2
|
||
|
name: term two
|
||
|
name_en:
|
||
|
codename:
|
||
|
name_en: ''
|
||
|
codename: ''
|
||
|
datatype: ''
|
||
|
description:
|
||
|
created_on: 2010-12-13 21:25:16
|
||
|
updated_on: 2010-12-14 21:25:16
|
||
| test/functional/glossary_controller_test.rb | ||
|---|---|---|
|
require File.dirname(__FILE__) + '/../test_helper'
|
||
|
|
||
|
class GlossaryControllerTest < ActionController::TestCase
|
||
|
# Replace this with your real tests.
|
||
|
def test_truth
|
||
|
assert true
|
||
|
fixtures :projects, :users, :roles, :members, :member_roles
|
||
|
plugin_fixtures :terms
|
||
|
|
||
|
def setup
|
||
|
@project = projects('projects_001')
|
||
|
@project.enabled_module_names = [:glossary]
|
||
|
roles('roles_001').add_permission! :view_terms, :manage_terms
|
||
|
end
|
||
|
|
||
|
def test_index
|
||
|
@request.session[:user_id] = users('users_002').id
|
||
|
get :index, params: { project_id: 1 }
|
||
|
assert_response :success
|
||
|
end
|
||
|
end
|
||
Make minimal functional test for glossary_controller