Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GrowBros
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tomato
GrowBros
Commits
c751b6dd
Commit
c751b6dd
authored
1 year ago
by
Karsch Lukas
Browse files
Options
Downloads
Patches
Plain Diff
#59
Finished integration tests - now contains garden, wishlist and plants
parent
760e8bb2
No related branches found
Branches containing commit
No related tags found
1 merge request
!50
Resolve "Integration tests"
Pipeline
#58474
failed
1 year ago
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+3
-5
3 additions, 5 deletions
.gitlab-ci.yml
src/test/java/hdm/mi/growbros/integration/PlantsIntegrationTest.java
+16
-0
16 additions, 0 deletions
...va/hdm/mi/growbros/integration/PlantsIntegrationTest.java
with
19 additions
and
5 deletions
.gitlab-ci.yml
+
3
−
5
View file @
c751b6dd
...
...
@@ -3,13 +3,13 @@ cache:
-
.m2/
stages
:
-
bu
il
d
-
comp
il
e
-
test
-
package
maven-
bu
il
d
:
maven-
comp
il
e
:
image
:
maven:3.8.5-openjdk-17
stage
:
bu
il
d
stage
:
comp
il
e
script
:
-
"
echo
'Starting
Build
Process'"
-
"
mvn
compile"
...
...
@@ -43,5 +43,3 @@ maven-package:
paths
:
-
target/*.jar
expire_in
:
2 days
This diff is collapsed.
Click to expand it.
src/test/java/hdm/mi/growbros/integration/PlantsIntegrationTest.java
+
16
−
0
View file @
c751b6dd
...
...
@@ -104,4 +104,20 @@ class PlantsIntegrationTest extends BaseIntegrationTest {
.
andExpect
(
status
().
isOk
())
.
andExpect
(
jsonPath
(
"$.plant.name"
).
value
(
pflanzeNumeroUno
.
getName
()));
}
@Test
void
admin_shouldUpdatePlant_code200
()
throws
Exception
{
PlantUpdateRequest
updateRequest
=
PlantUpdateRequest
.
builder
().
name
(
"new name!"
).
build
();
mvc
.
perform
(
patch
(
plantsUrl
+
"/1"
)
.
headers
(
adminAuthHeader
)
.
content
(
jsonMapper
.
convertObjectToJson
(
updateRequest
))
.
contentType
(
MediaType
.
APPLICATION_JSON
))
.
andExpect
(
status
().
isOk
())
.
andExpect
(
jsonPath
(
"$.name"
).
value
(
updateRequest
.
getName
()));
mvc
.
perform
(
get
(
plantsUrl
+
"/1"
).
headers
(
authHeader
))
.
andExpect
(
status
().
isOk
())
.
andExpect
(
jsonPath
(
"$.name"
).
value
(
updateRequest
.
getName
()));
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment