Skip to content

Instantly share code, notes, and snippets.

@perlDreamer
Created October 6, 2009 22:45
# Main test session: Fj0GhuHNA1LQ6EvfqjUYRA
# session ids:
# [
# 'Fj0GhuHNA1LQ6EvfqjUYRA',
# 'IRNXlYYjE_lPXZYA3jKXqw',
# 'QU2jgQmwJiKchbwuIQgzfg',
# 'rraV5-OsolH1HZf_mrvOPw'
# ]
# session scratch ids:
# [
# 'Fj0GhuHNA1LQ6EvfqjUYRA',
# 'IRNXlYYjE_lPXZYA3jKXqw',
# 'QU2jgQmwJiKchbwuIQgzfg',
# 'rraV5-OsolH1HZf_mrvOPw'
# ]
1..4
ok 1 - changing session user changes sessionId inside userSession table
ok 2 - Set session user to Admin, check userId==3
ok 3 - Set session user to Admin, check uiLevel==9
ok 4 - The object isa WebGUI::SQL
# Sessions : 4 (delta +0)
# session ids:
# [
# 'Fj0GhuHNA1LQ6EvfqjUYRA',
# 'IRNXlYYjE_lPXZYA3jKXqw',
# 'QU2jgQmwJiKchbwuIQgzfg',
# 'rraV5-OsolH1HZf_mrvOPw'
# ]
# Scratch : 4 (delta +0)
# session scratch ids:
# [
# 'Fj0GhuHNA1LQ6EvfqjUYRA',
# 'IRNXlYYjE_lPXZYA3jKXqw',
# 'QU2jgQmwJiKchbwuIQgzfg',
# 'rraV5-OsolH1HZf_mrvOPw'
# ]
# Users : 2 (delta +0)
# Groups : 15 (delta +0)
# mailQ : 0 (delta +0)
# Tags : 2 (delta +0)
# Assets : 594 (delta +0)
# Workflows : 12 (delta +0)
# Closing main test session: Fj0GhuHNA1LQ6EvfqjUYRA
# Main test session: Psn44CQ73lwXDK4m1d0vUA
# session ids:
# [
# 'IRNXlYYjE_lPXZYA3jKXqw',
# 'Psn44CQ73lwXDK4m1d0vUA',
# 'QU2jgQmwJiKchbwuIQgzfg',
# 'rraV5-OsolH1HZf_mrvOPw'
# ]
# session scratch ids:
# [
# 'IRNXlYYjE_lPXZYA3jKXqw',
# 'Psn44CQ73lwXDK4m1d0vUA',
# 'QU2jgQmwJiKchbwuIQgzfg',
# 'rraV5-OsolH1HZf_mrvOPw'
# ]
1..185
ok 1 - default constructor
ok 2 - new constructor explicit - ref check
ok 3 - new constructor explicit - returns correct asset
ok 4 - new constructor newByHashref - ref check
ok 5 - new constructor newByHashref - returns correct asset
ok 6 - new constructor implicit - ref check
ok 7 - new constructor implicit - returns correct asset
ok 8 - new constructor with no assetId returns undef
ok 9 - The object isa WebGUI::Asset
ok 10 - newByDynamicClass constructor - ref check
ok 11 - newByDynamicClass constructor - returns correct asset
ok 12 - newByDynamicClass constructor with invalid assetId returns undef
ok 13 - newByDynamicClass constructor returns 'undef' with no assetId
ok 14 - newByDynamicClass constructor returns 'undef' with no valid WebGUI::Session
ok 15 - newByDynamicClass constructor returns 'undef' with no valid WebGUI::Session
ok 16 - The object isa WebGUI::Asset
ok 17 - Root Asset ID check
ok 18 - The object isa WebGUI::Asset::Wobject::Folder
ok 19 - Media Folder Asset ID check
ok 20 - The object isa WebGUI::Asset::Wobject::Folder
ok 21 - Import Node Asset ID check
ok 22 - Import Nodes parent is Root Asset
ok 23 - The object isa WebGUI::Asset::Wobject::Folder
ok 24 - Tempspace Asset ID check
ok 25 - Tempspace parent is Root Asset
ok 26 - url for import node exists
ok 27 - url for import node exists, case insensitive
ok 28 - made up url does not exist
ok 29 - url for import node only exists at specific id
ok 30 - imaginary url does not exist at specific id
ok 31 - imaginary url does not exist at wrong id
ok 32 - addEditLabel, default mode is edit mode
ok 33 - addEditLabel, use add mode
ok 34 - asset setup correctly for 100->101 test
ok 35 - fixUrl leaves long URLs under 250 characters alone
ok 36 - fixUrl truncates long URLs over 250 characters to 220 characters
ok 37 - underscore prepended to URLs that match the extrasURL
ok 38 - underscore prepended to URLs that match the uploadsURL
ok 39 - trailing underscore in extrasURL does not defeat the check
ok 40 - underscore prepended to URLs that match the extrasURL, even with http://
ok 41 - extensions are not allowed higher up in the path
ok 42 - extensions are not allowed anywhere in the path
ok 43 - multiple dot extensions are removed in any path element
ok 44 - leading dots are okay
ok 45 - URLs are lowercased
ok 46 - If a node exists, appends a "2" to it
ok 47 - fixing an asset's own URL returns it unchanged
ok 48 - if a URL exists, fix it by incrementing any ending digits 2 -> 3
ok 49 - increments past single digits 9 -> 10
ok 50 - initial zeroes are not preserved 00 -> 1
ok 51 - 100->101
ok 52 - fixUrl will autogenerate a url if not provided one
ok 53 - Automatic adding of extensions works
ok 54 - extensions aren't automatically added if there is already and extension
ok 55 - digit zero
ok 56 - digit one
ok 57 - 3 digit integer
ok 58 - 22 digit integer
ok 59 - 44 digit integer
ok 60 - null string is rejected
ok 61 - single lower case character rejected
ok 62 - illegal characters in length 22 string rejected
ok 63 - valid id accepted
ok 64 - undef returns the Asset's title
ok 65 - null string returns the Asset's title
ok 66 - 'untitled' returns the Asset's title
ok 67 - 'untitled' in any case returns the Asset's title
ok 68 - Macros are negated
ok 69 - Markup is stripped out
ok 70 - javascript removed
ok 71 - Good titles are passed
ok 72 - If there is no title left after processing, then it is set to untitled.
ok 73 - Quotes are not processed.
ok 74 - fixTitle: title is false, fixTitle returns 'Untitled'
ok 75 - getTitle: undef returns the Asset's name
ok 76 - getTitle: undef returns the Asset's name
ok 77 - getTitle: null string returns the Asset's name
ok 78 - getTitle: null string returns the Asset's name
ok 79 - getTitle: 'untitled' returns the Asset's name
ok 80 - getTitle: 'untitled' returns the Asset's name
ok 81 - getTitle: 'untitled' in any case returns the Asset's title
ok 82 - getTitle: 'untitled' in any case returns the Asset's title
ok 83 - getTitle: Good titles are passed
ok 84 - getTitle: Good titles are passed
ok 85 - getIcon gets correct icon for importNode
ok 86 - getIcon gets small icon for importNode
ok 87 - getIcon returns an icon from the extras URL
ok 88 - getIcon gets icon for a layout
ok 89 - getIcon gets icon for a snippet
not ok 90 - Test the default name for the icon, if not given in the definition sub # TODO Coverage test
# Failed (TODO) test 'Test the default name for the icon, if not given in the definition sub'
# at t/Asset/Asset.t line 490.
ok 91 - user Admin passes canAdd check using default user for WebGUI::Asset
ok 92 - user Admin passes canAdd check for WebGUI::Asset
ok 93 - userId zGdogQQdhwskblAskKZmJQ passes canAdd check using default user for WebGUI::Asset
ok 94 - userId zGdogQQdhwskblAskKZmJQ passes canAdd check for WebGUI::Asset
ok 95 - user Visitor passes canAdd check using default user for WebGUI::Asset
ok 96 - user Visitor passes canAdd check for WebGUI::Asset
ok 97 - user regular user passes canAdd check using default user for WebGUI::Asset
ok 98 - user regular user passes canAdd check for WebGUI::Asset
ok 99 - user Turn On Admin user passes canAdd check using default user for WebGUI::Asset
ok 100 - user Turn On Admin user passes canAdd check for WebGUI::Asset
ok 101 - user Admin passes canEdit check using default user for WebGUI::Asset
ok 102 - user Admin passes canEdit check for WebGUI::Asset
ok 103 - user Asset Owner passes canEdit check using default user for WebGUI::Asset
ok 104 - user Asset Owner passes canEdit check for WebGUI::Asset
ok 105 - user Can Add Group User passes canEdit check using default user for WebGUI::Asset
ok 106 - user Can Add Group User passes canEdit check for WebGUI::Asset
ok 107 - user Visitor passes canEdit check using default user for WebGUI::Asset
ok 108 - user Visitor passes canEdit check for WebGUI::Asset
ok 109 - user regular user passes canEdit check using default user for WebGUI::Asset
ok 110 - user regular user passes canEdit check for WebGUI::Asset
ok 111 - user Visitor passes canView check using default user for WebGUI::Asset
ok 112 - user Visitor passes canView check for WebGUI::Asset
ok 113 - user Admin passes canView check using default user for WebGUI::Asset
ok 114 - user Admin passes canView check for WebGUI::Asset
ok 115 - user Asset Owner passes canView check using default user for WebGUI::Asset
ok 116 - user Asset Owner passes canView check for WebGUI::Asset
ok 117 - user Can Add Group User passes canView check using default user for WebGUI::Asset
ok 118 - user Can Add Group User passes canView check for WebGUI::Asset
ok 119 - user regular user passes canView check using default user for WebGUI::Asset
ok 120 - user regular user passes canView check for WebGUI::Asset
ok 121 - user Admin passes canView check using default user for WebGUI::Asset
ok 122 - user Admin passes canView check for WebGUI::Asset
ok 123 - user Asset Owner passes canView check using default user for WebGUI::Asset
ok 124 - user Asset Owner passes canView check for WebGUI::Asset
ok 125 - user Can Add Group User passes canView check using default user for WebGUI::Asset
ok 126 - user Can Add Group User passes canView check for WebGUI::Asset
ok 127 - user Visitor passes canView check using default user for WebGUI::Asset
ok 128 - user Visitor passes canView check for WebGUI::Asset
ok 129 - user regular user passes canView check using default user for WebGUI::Asset
ok 130 - user regular user passes canView check for WebGUI::Asset
ok 131 - addMissing doesn't return anything unless use is in Admin Mode
ok 132 - addMissing returns some output when in Admin Mode
ok 133 - addMissing: Link will add a new page asset with correct URL
ok 134 - getContainer: A folder is a container, its container is itself
ok 135 - getContainer: A snippet is not a container, its container is its parent
ok 136 - getName: Returns the internationalized name of the Asset, Snippet
ok 137 - getName: Returns the internationalized name of the Asset, Folder
ok 138 - getName: Returns the internationalized name of the Asset, core Asset
ok 139 - getToolbarState: default toolbar state is undef
ok 140 - getToolbarState: toggleToolbarState toggled the state to 1
ok 141 - getToolbarState: toggleToolbarState toggled the state to 0
ok 142 - getUiLevel: WebGUI::Asset uses the default uiLevel of 1
ok 143 - getUiLevel: Snippet has an uiLevel of 5
ok 144 - getUiLevel: WebGUI::Asset has a configured uiLevel of 8
ok 145 - getUiLevel: Snippet has a configured uiLevel of 8
ok 146 - assetExists with proper class, id and revisionDate
ok 147 - assetExists with wrong class does not exist
ok 148 - assetExists with wrong id does not exist
ok 149 - assetExists with wrong revisionDate does not exist
ok 150 - isValidRssItem: By default, all Assets are valid RSS items
ok 151 - getEditTabs: 4 tabs by default
ok 152 - getEditForm: Returns a tabForm isa WebGUI::TabForm
not ok 153 - Validate form output # TODO More getEditForm tests
# Failed (TODO) test 'Validate form output'
# at t/Asset/Asset.t line 646.
ok 154 - newByDynamicClass did not fail
ok 155 - newByDynamicClass: able to look up an existing asset by id isa WebGUI::Asset
ok 156 - newByDynamicClass created a duplicate asset
ok 157 - getNotFound: Returns an asset isa WebGUI::Asset
ok 158 - getNotFound: Returns the correct asset
ok 159 - getNotFound: Returns the correct asset on a different asset
ok 160 - isExportable exists, defaults to 1
ok 161 - getSeparator, known assetId
ok 162 - getSeparator, given pad character
ok 163 - getSeparator: unique string
ok 164 - get returns a safe copy of the Asset properties
ok 165 - getIsa returns a sub ref isa CODE
ok 166 - getIsa: returned only 3 Products
ok 167 - getIsa returned the correct 3 products
ok 168 - getIsa: returned only 3 Products for a parent class
ok 169 - getIsa returned the correct 3 products for a parent class
ok 170 - inheritUrlFromParent works
ok 171 - ... works when created with the property
ok 172 - ... setting inheritUrlFromParent to 0 works
ok 173 - ... disabling inheritUrlFromParent actually works
ok 174 - ... recurses properly
ok 175 - ... update works propertly when iUFP is not passed
ok 176 - built non-committed parent asset
ok 177 - built non-committed child asset
ok 178 - uncommitted parent asset and uncommitted child asset have same version tag at addChild
ok 179 - confimr non-committed parent asset after revision
ok 180 - confirm non-committed child asset after revision
ok 181 - uncommitted parent asset and uncommitted child asset have same version tag after addRevision
ok 182 - parent asset is now committed
ok 183 - child asset is now committed
ok 184 - cloneFromDb: local asset is still pending
ok 185 - ... returns fresh, commited asset from the db
# Sessions : 4 (delta +0)
# session ids:
# [
# 'IRNXlYYjE_lPXZYA3jKXqw',
# 'Psn44CQ73lwXDK4m1d0vUA',
# 'QU2jgQmwJiKchbwuIQgzfg',
# 'rraV5-OsolH1HZf_mrvOPw'
# ]
# Scratch : 4 (delta +0)
# session scratch ids:
# [
# 'IRNXlYYjE_lPXZYA3jKXqw',
# 'Psn44CQ73lwXDK4m1d0vUA',
# 'QU2jgQmwJiKchbwuIQgzfg',
# 'rraV5-OsolH1HZf_mrvOPw'
# ]
# Users : 2 (delta +0)
# Groups : 15 (delta +0)
# mailQ : 0 (delta +0)
# Tags : 2 (delta +0)
# Assets : 594 (delta +0)
# Workflows : 12 (delta +0)
# Closing main test session: Psn44CQ73lwXDK4m1d0vUA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment