Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
631db18c
Commit
631db18c
authored
Mar 03, 2019
by
Greg Messner
Browse files
Now tests Diff using an array.
parent
4dabe711
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
View file @
631db18c
...
...
@@ -127,8 +127,8 @@ public class TestGitLabApiBeans {
@Test
public
void
testDiff
()
throws
Exception
{
Diff
diff
=
unmarshalResource
(
Diff
.
class
,
"diff.json"
);
assertTrue
(
compareJson
(
diff
,
"diff.json"
));
List
<
Diff
>
diff
s
=
unmarshalResource
List
(
Diff
.
class
,
"diff.json"
);
assertTrue
(
compareJson
(
diff
s
,
"diff.json"
));
}
@Test
...
...
src/test/resources/org/gitlab4j/api/diff.json
View file @
631db18c
{
"diff"
:
"--- a/doc/update/5.4-to-6.0.html
\n
+++ b/doc/update/5.4-to-6.0.html
\n
@@ -71,6 +71,8 @@
\n
sudo -u git -H bundle exec rake migrate_keys RAILS_ENV=production
\n
sudo -u git -H bundle exec rake migrate_inline_notes RAILS_ENV=production
\n
\n
+sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
\n
+
\n
```
\n
\n
### 6. Update config files"
,
"new_path"
:
"doc/update/5.4-to-6.0.html"
,
"old_path"
:
"doc/update/5.4-to-6.0.html"
,
"a_mode"
:
null
,
"b_mode"
:
"100644"
,
"new_file"
:
false
,
"renamed_file"
:
false
,
"deleted_file"
:
false
}
[
{
"old_path"
:
"core/src/main/java/codereview/service/data/XxxDAO.java"
,
"new_path"
:
"core/src/main/java/codereview/service/data/XxxDAO.java"
,
"a_mode"
:
"100644"
,
"b_mode"
:
"100644"
,
"new_file"
:
false
,
"renamed_file"
:
false
,
"deleted_file"
:
false
,
"diff"
:
"@@ -114,5 +114,13 @@ diff content here
\n
"
},
{
"old_path"
:
"core/src/main/java/codereview/service/data/XxxService.java"
,
"new_path"
:
"core/src/main/java/codereview/service/data/XxxService.java"
,
"a_mode"
:
"100644"
,
"b_mode"
:
"100644"
,
"new_file"
:
false
,
"renamed_file"
:
false
,
"deleted_file"
:
false
,
"diff"
:
"@@ -5,6 +5,7 @@ diff content here
\n
"
}
]
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment