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

Version Path
netzke-basepack-0.8.4 test/unit/fields_configuration_test.rb
netzke-basepack-0.8.3 test/unit/fields_configuration_test.rb
netzke-basepack-0.8.2 test/unit/fields_configuration_test.rb
netzke-basepack-0.8.1 test/unit/fields_configuration_test.rb
netzke-basepack-0.8.0 test/unit/fields_configuration_test.rb
netzke-basepack-0.7.7 test/unit/fields_configuration_test.rb
netzke-basepack-zh-0.7.6 test/unit/fields_configuration_test.rb
netzke-basepack-0.7.6 test/unit/fields_configuration_test.rb
netzke-basepack-0.7.5 test/unit/fields_configuration_test.rb
netzke-basepack-0.7.4 test/unit/fields_configuration_test.rb
netzke-basepack-0.7.3 test/unit/fields_configuration_test.rb
netzke-basepack-0.7.2 test/unit/fields_configuration_test.rb
netzke-basepack-0.7.1 test/unit/fields_configuration_test.rb
netzke-basepack-0.6.5 test/unit/fields_configuration_test.rb
netzke-basepack-0.7.0 test/unit/fields_configuration_test.rb
netzke-basepack-0.6.4 test/unit/fields_configuration_test.rb
netzke-basepack-0.6.3 test/unit/fields_configuration_test.rb
netzke-basepack-0.6.2 test/unit/fields_configuration_test.rb
netzke-basepack-0.6.1 test/unit/fields_configuration_test.rb