Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
000033e2
authored
2014-11-04 22:07:38 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update the test case
1 parent
15242d89
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
session/sess_cookie_test.go
session/sess_mem_test.go
session/sess_cookie_test.go
View file @
000033e
...
...
@@ -29,7 +29,10 @@ func TestCookie(t *testing.T) {
}
r
,
_
:=
http
.
NewRequest
(
"GET"
,
"/"
,
nil
)
w
:=
httptest
.
NewRecorder
()
sess
:=
globalSessions
.
SessionStart
(
w
,
r
)
sess
,
err
:=
globalSessions
.
SessionStart
(
w
,
r
)
if
err
!=
nil
{
t
.
Fatal
(
"set error,"
,
err
)
}
err
=
sess
.
Set
(
"username"
,
"astaxie"
)
if
err
!=
nil
{
t
.
Fatal
(
"set error,"
,
err
)
...
...
session/sess_mem_test.go
View file @
000033e
...
...
@@ -26,9 +26,12 @@ func TestMem(t *testing.T) {
go
globalSessions
.
GC
()
r
,
_
:=
http
.
NewRequest
(
"GET"
,
"/"
,
nil
)
w
:=
httptest
.
NewRecorder
()
sess
:=
globalSessions
.
SessionStart
(
w
,
r
)
sess
,
err
:=
globalSessions
.
SessionStart
(
w
,
r
)
if
err
!=
nil
{
t
.
Fatal
(
"set error,"
,
err
)
}
defer
sess
.
SessionRelease
(
w
)
err
:
=
sess
.
Set
(
"username"
,
"astaxie"
)
err
=
sess
.
Set
(
"username"
,
"astaxie"
)
if
err
!=
nil
{
t
.
Fatal
(
"set error,"
,
err
)
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment