Created
November 14, 2016 09:24
-
-
Save jomag/dff4527cbeb7bb661d67ad63fd150b4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This test complains that @controller is nil: | |
# -*- coding: utf-8 -*- | |
require 'test_helper' | |
class Admin::ProductGroupsControllerTest < ActionController::TestCase | |
test "should show new product group form" do | |
login_with_role 'employee' | |
get :new | |
assert_select "form input[id=product_group_title]" | |
assert_select "form input[id=product_group_artno]" | |
assert_select "form input[id=product_group_unit]" | |
assert_select "form input[id=product_group_vat]" | |
end | |
Here's the controller: | |
# encoding: utf-8 | |
require 'spreadsheet' | |
class Admin::ProductGroupsController < Admin::BaseController | |
before_filter :find_product_group, :only => [ 'show', 'edit', 'update', 'destroy', 'preview' ] | |
helper_method :sort_column, :sort_direction, :search_parameters | |
layout 'admin/product_groups' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment