Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
6b4774c9
Commit
6b4774c9
authored
Aug 22, 2019
by
Piotr Gawron
Browse files
test checking if undefined project is proper handled when listing reactions
parent
cc336996
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/src/test/java/lcsb/mapviewer/web/ReactionControllerIntegrationTest.java
View file @
6b4774c9
...
...
@@ -10,6 +10,7 @@ import org.junit.*;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.mock.web.MockHttpSession
;
import
org.springframework.test.annotation.Rollback
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.web.servlet.RequestBuilder
;
...
...
@@ -74,4 +75,17 @@ public class ReactionControllerIntegrationTest extends ControllerIntegrationTest
assertTrue
(
"user should be able to access elements"
,
reactions
>
0
);
}
@Test
public
void
testGetReactionsWithUndefinedProject
()
throws
Exception
{
MockHttpSession
session
=
createSession
(
ControllerIntegrationTest
.
BUILT_IN_TEST_ADMIN_LOGIN
,
ControllerIntegrationTest
.
BUILT_IN_TEST_ADMIN_PASSWORD
);
RequestBuilder
request
=
get
(
"/projects/*/models/*/bioEntities/reactions/"
)
.
contentType
(
MediaType
.
APPLICATION_FORM_URLENCODED
)
.
session
(
session
);
mockMvc
.
perform
(
request
)
.
andExpect
(
status
().
isNotFound
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment