add account-level external tool resource_selection route

test plan:
* add an account-level external tool that adds an
editor button (e.g. 'Youtube', 'Trello')
* use the tinymce editor in an account-level context
(e.g. edit an account-level outcome description)
* click the editor button
* should not get a 'Page not found' error

fixes #CNVS-6714

Change-Id: I505963e61fc8180646dd829aaa2a5b9003b35ab0
Reviewed-on: https://gerrit.instructure.com/22106
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
This commit is contained in:
James Williams 2013-07-08 15:01:41 -06:00
parent ccae3722dd
commit 251e1fce4f
2 changed files with 12 additions and 0 deletions

View File

@ -546,9 +546,11 @@ FakeRails3Routes.draw do
match 'test_ldap_logins' => 'account_authorization_configs#test_ldap_login', :as => :test_ldap_logins
match 'saml_testing' => 'account_authorization_configs#saml_testing', :as => :saml_testing
match 'saml_testing_stop' => 'account_authorization_configs#saml_testing_stop', :as => :saml_testing_stop
match 'external_tools/sessionless_launch' => 'external_tools#sessionless_launch', :as => :external_tools_sessionless_launch
resources :external_tools do
match 'finished' => 'external_tools#finished', :as => :finished
match 'resource_selection' => 'external_tools#resource_selection', :as => :resource_selection
end
concerns :chats

View File

@ -110,6 +110,16 @@ describe ExternalToolsController do
assigns[:tool_settings]['custom_canvas_enrollment_state'].should == 'active'
end
it "should find account-level tools" do
@user = account_admin_user
user_session(@user)
tool = new_valid_tool(Account.default)
get 'resource_selection', :account_id => Account.default.id, :external_tool_id => tool.id
response.should be_success
assigns[:tool].should == tool
end
it "should be accessible even after course is soft-concluded" do
course_with_student_logged_in(:active_all => true)
@course.conclude_at = 1.day.ago