23 lines
634 B
Smalltalk
23 lines
634 B
Smalltalk
Class {
|
|
#name : #LeSnippetTest,
|
|
#superclass : #TestCase,
|
|
#category : #LepiterPlugins
|
|
}
|
|
|
|
{ #category : #tests }
|
|
LeSnippetTest >> testSnippetMovementBetweenPages [
|
|
|
|
| db origin testSnippet testUUID destination |
|
|
|
|
db := LeDatabase new.
|
|
origin := db addTestPage.
|
|
destination := db addTestPage.
|
|
testSnippet := LeSnippet new.
|
|
origin children addSnippet: testSnippet after: (origin children last).
|
|
testUUID := testSnippet uid.
|
|
testSnippet moveFrom: origin title to: destination title.
|
|
self assert: ( destination includesSnippetUid: testUUID ).
|
|
self assert: ( origin includesSnippetUid: testUUID ) not.
|
|
db removeSelf.
|
|
]
|