diff options
author | Frédéric Cilia | 2018-07-30 07:20:22 +0000 |
---|---|---|
committer | Thomas Wolf | 2018-12-14 21:02:54 +0000 |
commit | bd6e12bad6eced1d82cf3395755ce19082ad685e (patch) | |
tree | 8b55df44b84a3640714fad06616e9bb97bbc15da /org.eclipse.egit.github.core.tests/src | |
parent | 6be10360ff6ad2173696c08a2ccaf8d304426747 (diff) | |
download | egit-github-bd6e12bad6eced1d82cf3395755ce19082ad685e.tar.gz egit-github-bd6e12bad6eced1d82cf3395755ce19082ad685e.tar.xz egit-github-bd6e12bad6eced1d82cf3395755ce19082ad685e.zip |
Implement delete reference, tag and branch
Change-Id: I66973315ef82f70bc99c80fe3360f8cb9476888a
Signed-off-by: Frédéric Cilia <frederic.cilia@hardis.fr>
Diffstat (limited to 'org.eclipse.egit.github.core.tests/src')
-rw-r--r-- | org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java index 2f485e24..03bbdd79 100644 --- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java +++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java @@ -431,4 +431,42 @@ public class DataServiceTest { service.createTag(repo, tag); verify(client).post(eq("/repos/o/n/git/tags"), any(), eq(Tag.class)); } + + /** + * Delete reference + * + * @throws IOException + */ + @Test + public void deleteReference() throws IOException { + Reference ref = new Reference(); + ref.setRef("refs/heads/master"); + service.deleteReference(repo, ref); + verify(client).delete(eq("/repos/o/n/git/refs/heads/master")); + } + + /** + * Delete branch + * + * @throws IOException + */ + @Test + public void deleteBranch() throws IOException { + String branch = "branch"; + service.deleteBranch(repo, branch); + verify(client).delete(eq("/repos/o/n/git/refs/heads/branch")); + } + + /** + * Delete tag + * + * @throws IOException + */ + @Test + public void deleteTag() throws IOException { + Tag tag = new Tag(); + tag.setTag("tag"); + service.deleteTag(repo, tag); + verify(client).delete(eq("/repos/o/n/git/refs/tags/tag")); + } } |