Plugins UI needs 'dynamic_form'
closes CNVS-19816 make sure we have a spec to check rendering of the plugins setting view from now on, and explicitly require 'dynamic_form' in the plugins controller also removes a linter that shouldn't be on for describing classes (or views in this case) TEST PLAN: 1) go configure any plugin 2) it should not explode Change-Id: I32e58a524ddb18b922ba79e20e9e7b9c1f2a8f07 Reviewed-on: https://gerrit.instructure.com/52216 Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Jenkins QA-Review: Ethan Vizitei <evizitei@instructure.com> Product-Review: Ethan Vizitei <evizitei@instructure.com>
This commit is contained in:
parent
dd941fc6a6
commit
b1235a0631
|
@ -109,5 +109,7 @@ RSpec/ExampleWording:
|
|||
Enabled: false
|
||||
RSpec/DescribedClass:
|
||||
Enabled: false
|
||||
RSpec/DescribeClass:
|
||||
Enabled: false
|
||||
Style/HashSyntax:
|
||||
Enabled: false
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
# You should have received a copy of the GNU Affero General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
require 'dynamic_form'
|
||||
|
||||
class PluginsController < ApplicationController
|
||||
before_filter :require_setting_site_admin, :set_site_admin_context, :set_navigation
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
||||
require File.expand_path(File.dirname(__FILE__) + '/../views_helper')
|
||||
|
||||
describe "plugins/show" do
|
||||
it "renders without exploding" do
|
||||
plugin = stub(
|
||||
id: 'some_plugin',
|
||||
name: "Some Plugin",
|
||||
settings_partial: "settings_header"
|
||||
)
|
||||
plugin_setting = PluginSetting.new()
|
||||
|
||||
assigns[:plugin] = plugin
|
||||
assigns[:plugin_setting] = plugin_setting
|
||||
view.stubs(:plugin_path).returns("/some/path")
|
||||
view.stubs(:params).returns({id: 'some_plugin'})
|
||||
render 'plugins/show'
|
||||
expect(response.body).to match("Return to plugins list")
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue