-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8978e38
commit 60896f9
Showing
9 changed files
with
354 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,7 +254,18 @@ func TestNotesAPI_setSavedCheckboxItem(t *testing.T) { | |
cb.Type = "checkbox" | ||
api := sapi.GetNew() | ||
|
||
api.setSavedCheckboxNote(&cb) | ||
var ntlst []Note | ||
var n1 Note | ||
n1.ID = 5 | ||
n1.LastUsed = time.Now() | ||
n1.OwnerEmail = "[email protected]" | ||
n1.NoteItems = cbilst | ||
n1.Title = "cb note 1" | ||
n1.Type = "checkbox" | ||
ntlst = append(ntlst, n1) | ||
sapi.noteList = ntlst | ||
|
||
//api.setSavedCheckboxNote(&cb) | ||
|
||
var cbi3 CheckboxNoteItem | ||
cbi3.Checked = false | ||
|
@@ -263,7 +274,9 @@ func TestNotesAPI_setSavedCheckboxItem(t *testing.T) { | |
|
||
api.setSavedCheckboxItem(&cbi3) | ||
|
||
if len(sapi.checkboxNoteList[0].NoteItems) != 3 { | ||
ilst := sapi.noteList[0].NoteItems.([]CheckboxNoteItem) | ||
|
||
if len(ilst) != 3 { | ||
t.Fail() | ||
} | ||
|
||
|
@@ -296,7 +309,19 @@ func TestNotesAPI_setSavedCheckboxItem2(t *testing.T) { | |
cb.Type = "checkbox" | ||
api := sapi.GetNew() | ||
|
||
api.setSavedCheckboxNote(&cb) | ||
|
||
var ntlst []Note | ||
var n1 Note | ||
n1.ID = 5 | ||
n1.LastUsed = time.Now() | ||
n1.OwnerEmail = "[email protected]" | ||
n1.NoteItems = cbilst | ||
n1.Title = "cb note 1" | ||
n1.Type = "checkbox" | ||
ntlst = append(ntlst, n1) | ||
sapi.noteList = ntlst | ||
|
||
//api.setSavedCheckboxNote(&cb) | ||
|
||
var cbi3 CheckboxNoteItem | ||
cbi3.ID = 2 | ||
|
@@ -306,7 +331,9 @@ func TestNotesAPI_setSavedCheckboxItem2(t *testing.T) { | |
|
||
api.setSavedCheckboxItem(&cbi3) | ||
|
||
if len(sapi.checkboxNoteList[0].NoteItems) != 2 { | ||
ilst := sapi.noteList[0].NoteItems.([]CheckboxNoteItem) | ||
|
||
if len(ilst) != 2 { | ||
t.Fail() | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.