Sha256: fe6b488b9e651f1a29a357b04c14625d0c0cca132ca4341f30ffba59ddef8532

Contents?: true

Size: 775 Bytes

Versions: 7

Compression:

Stored size: 775 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

7 entries across 7 versions & 1 rubygems

Version Path
netzke-basepack-0.6.0 test/unit/fields_configuration_test.rb
netzke-basepack-0.5.14 test/unit/fields_configuration_test.rb
netzke-basepack-0.5.13 test/unit/fields_configuration_test.rb
netzke-basepack-0.5.12 test/unit/fields_configuration_test.rb
netzke-basepack-0.5.11 test/unit/fields_configuration_test.rb
netzke-basepack-0.5.10 test/unit/fields_configuration_test.rb
netzke-basepack-0.5.9 test/unit/fields_configuration_test.rb