Sha256: 17b8a8da6835443502d4cffb9f39dc58014a5d44b88157502414cf2e9dd6a78b
Contents?: true
Size: 761 Bytes
Versions: 19
Compression:
Stored size: 761 Bytes
Contents
require 'test_helper' require 'netzke-core' class FieldsConfigurationTest < ActiveSupport::TestCase test "attributes configurator" do Netzke::Base.session[:netzke_user_id] = User.find_by_login("seller1").id NetzkeModelAttrList.update_list_for_current_authority("Book", [{:name => "title", :label => "Title for seller1", :hidden => false}, {:name => "recent", :label => "Recent", :hidden => true}]) list = NetzkeModelAttrList.read_list("Book") assert_equal(["Title for seller1", false], [list[0][:label], list[0][:hidden]]) Netzke::Base.masquerade_as(:role, Role.find_by_name("seller").id) list = NetzkeModelAttrList.read_list("Book") # assert_equal(["Title for seller1", false], [list[0][:label], list[0][:hidden]]) end end
Version data entries
19 entries across 19 versions & 2 rubygems