Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem loading fixtures #1

Open
TheR2 opened this issue Aug 19, 2015 · 0 comments
Open

Problem loading fixtures #1

TheR2 opened this issue Aug 19, 2015 · 0 comments

Comments

@TheR2
Copy link

TheR2 commented Aug 19, 2015

I am breaking my head on this fixture data.

mysite:
  name: 'www.mysite.com'
  homepage_link: "home"
  menu_class: "DcSimpleMenu"
  menu_name: "site-menu"
  page_class: "DcPage"
  page_table: "dc_page"
  files_directory: "files"
  settings: "ckeditor:
    config_file: /files/ck_config.js
    css_file: /files/ck_css.css"
  site_layout: "content"
  dc_policies:
    - description: Default policy
      is_default: true
      message: Access denied.
      name: Default policy
      dc_policy_rules:
        - dc_policy_role: sa
          permission: 2
        - dc_policy_role: guest
          permission: 1

test:
  name: test
  alias_for: www.mysite.com

Problem lies in dc_policies embedded document. Whatever I do I only get name field populated and only dc_policy_role_id in dc_policy_rules document. And 2 dc_policies documents instead of one.

/* 0 */
{
  "_id" : ObjectId("55d454407246cd1b41000006"),
  "active" : true,
  "__fixture_name" : "test",
  "updated_at" : ISODate("2015-08-19T10:02:40.283Z"),
  "created_at" : ISODate("2015-08-19T10:02:40.283Z"),
  "name" : "test",
  "alias_for" : "www.mysite.com"
}
/* 1 */
{
  "_id" : ObjectId("55d454407246cd1b41000005"),
  "page_class" : "DcPage",
  "site_layout" : "content",
  "menu_class" : "DcSimpleMenu",
  "active" : true,
  "__fixture_name" : "mysite",
  "updated_at" : ISODate("2015-08-19T10:02:40.28Z"),
  "created_at" : ISODate("2015-08-19T10:02:40.28Z"),
  "name" : "www.mysite.com",
  "homepage_link" : "home",
  "menu_name" : "site-menu",
  "page_table" : "dc_page",
  "files_directory" : "files",
  "settings" : "ckeditor: config_file: /files/ck_config.js css_file: /files/ck_css.css",
  "dc_policies" : [{
      "name" : "Default policy",
      "dc_policy_rules" : [{
          "dc_policy_role_id" : ObjectId("55d454407246cd1b41000000")
        }, {
          "dc_policy_role_id" : ObjectId("55d454407246cd1b41000001")
        }]
    }, {
      "name" : "Default policy",
      "dc_policy_rules" : [{
          "dc_policy_role_id" : ObjectId("55d454407246cd1b41000000")
        }, {
          "dc_policy_role_id" : ObjectId("55d454407246cd1b41000001")
        }]
    }]
}

What am I doing wrong.

by
TheR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant