summaryrefslogtreecommitdiff
path: root/tests/units/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/fixtures')
-rw-r--r--tests/units/fixtures/gitlab_comment_created.json46
-rw-r--r--tests/units/fixtures/gitlab_issue_closed.json25
-rw-r--r--tests/units/fixtures/gitlab_issue_opened.json25
-rw-r--r--tests/units/fixtures/gitlab_push.json44
4 files changed, 140 insertions, 0 deletions
diff --git a/tests/units/fixtures/gitlab_comment_created.json b/tests/units/fixtures/gitlab_comment_created.json
new file mode 100644
index 00000000..b6599419
--- /dev/null
+++ b/tests/units/fixtures/gitlab_comment_created.json
@@ -0,0 +1,46 @@
+{
+ "object_kind": "note",
+ "user": {
+ "name": "Fred",
+ "username": "minicoders",
+ "avatar_url": "https://secure.gravatar.com/avatar/3c44936e5a56f80711bff14987d2733f?s=40&d=identicon"
+ },
+ "project_id": 320820,
+ "repository": {
+ "name": "test-webhook",
+ "url": "git@gitlab.com:minicoders/test-webhook.git",
+ "description": "",
+ "homepage": "https://gitlab.com/minicoders/test-webhook"
+ },
+ "object_attributes": {
+ "id": 1642761,
+ "note": "Super comment!",
+ "noteable_type": "Issue",
+ "author_id": 74067,
+ "created_at": "2015-07-17 21:37:48 UTC",
+ "updated_at": "2015-07-17 21:37:48 UTC",
+ "project_id": 320820,
+ "attachment": null,
+ "line_code": null,
+ "commit_id": "",
+ "noteable_id": 355691,
+ "st_diff": null,
+ "system": false,
+ "url": "https://gitlab.com/minicoders/test-webhook/issues/1#note_1642761"
+ },
+ "issue": {
+ "id": 355691,
+ "title": "Bug",
+ "assignee_id": null,
+ "author_id": 74067,
+ "project_id": 320820,
+ "created_at": "2015-07-17 21:31:47 UTC",
+ "updated_at": "2015-07-17 21:37:48 UTC",
+ "position": 0,
+ "branch_name": null,
+ "description": "There is a bug somewhere.\r\n\r\nBye",
+ "milestone_id": null,
+ "state": "opened",
+ "iid": 1
+ }
+} \ No newline at end of file
diff --git a/tests/units/fixtures/gitlab_issue_closed.json b/tests/units/fixtures/gitlab_issue_closed.json
new file mode 100644
index 00000000..82500b3c
--- /dev/null
+++ b/tests/units/fixtures/gitlab_issue_closed.json
@@ -0,0 +1,25 @@
+{
+ "object_kind": "issue",
+ "user": {
+ "name": "Fred",
+ "username": "minicoders",
+ "avatar_url": "https://secure.gravatar.com/avatar/3c44936e5a56f80711bff14987d2733f?s=40&d=identicon"
+ },
+ "object_attributes": {
+ "id": 355691,
+ "title": "Bug",
+ "assignee_id": null,
+ "author_id": 74067,
+ "project_id": 320820,
+ "created_at": "2015-07-17 21:31:47 UTC",
+ "updated_at": "2015-07-17 22:10:17 UTC",
+ "position": 0,
+ "branch_name": null,
+ "description": "There is a bug somewhere.\r\n\r\nBye",
+ "milestone_id": null,
+ "state": "closed",
+ "iid": 1,
+ "url": "https://gitlab.com/minicoders/test-webhook/issues/1",
+ "action": "close"
+ }
+} \ No newline at end of file
diff --git a/tests/units/fixtures/gitlab_issue_opened.json b/tests/units/fixtures/gitlab_issue_opened.json
new file mode 100644
index 00000000..3e75c138
--- /dev/null
+++ b/tests/units/fixtures/gitlab_issue_opened.json
@@ -0,0 +1,25 @@
+{
+ "object_kind": "issue",
+ "user": {
+ "name": "Fred",
+ "username": "minicoders",
+ "avatar_url": "https://secure.gravatar.com/avatar/3c44936e5a56f80711bff14987d2733f?s=40&d=identicon"
+ },
+ "object_attributes": {
+ "id": 355691,
+ "title": "Bug",
+ "assignee_id": null,
+ "author_id": 74067,
+ "project_id": 320820,
+ "created_at": "2015-07-17 21:31:47 UTC",
+ "updated_at": "2015-07-17 21:31:47 UTC",
+ "position": 0,
+ "branch_name": null,
+ "description": "There is a bug somewhere.\r\n\r\nBye",
+ "milestone_id": null,
+ "state": "opened",
+ "iid": 1,
+ "url": "https://gitlab.com/minicoders/test-webhook/issues/1",
+ "action": "open"
+ }
+} \ No newline at end of file
diff --git a/tests/units/fixtures/gitlab_push.json b/tests/units/fixtures/gitlab_push.json
new file mode 100644
index 00000000..ed77f041
--- /dev/null
+++ b/tests/units/fixtures/gitlab_push.json
@@ -0,0 +1,44 @@
+{
+ "object_kind": "push",
+ "before": "e4ec6156d208a45fc546fae73c28300b5af1692a",
+ "after": "48aafa75eef9ad253aa254b0c82c987a52ebea78",
+ "ref": "refs/heads/master",
+ "checkout_sha": "48aafa75eef9ad253aa254b0c82c987a52ebea78",
+ "message": null,
+ "user_id": 74067,
+ "user_name": "Fred",
+ "user_email": "f+gitlab@minicoders.com",
+ "project_id": 320820,
+ "repository": {
+ "name": "test-webhook",
+ "url": "git@gitlab.com:minicoders/test-webhook.git",
+ "description": "",
+ "homepage": "https://gitlab.com/minicoders/test-webhook",
+ "git_http_url": "https://gitlab.com/minicoders/test-webhook.git",
+ "git_ssh_url": "git@gitlab.com:minicoders/test-webhook.git",
+ "visibility_level": 0
+ },
+ "commits": [
+ {
+ "id": "48aafa75eef9ad253aa254b0c82c987a52ebea78",
+ "message": "Fix bug #2",
+ "timestamp": "2015-06-21T00:41:41+00:00",
+ "url": "https://gitlab.com/minicoders/test-webhook/commit/48aafa75eef9ad253aa254b0c82c987a52ebea78",
+ "author": {
+ "name": "Fred",
+ "email": "me@localhost"
+ }
+ },
+ {
+ "id": "e4ec6156d208a45fc546fae73c28300b5af1692a",
+ "message": "test",
+ "timestamp": "2015-06-21T00:35:55+00:00",
+ "url": "https://gitlab.com/localhost/test-webhook/commit/e4ec6156d208a45fc546fae73c28300b5af1692a",
+ "author": {
+ "name": "Fred",
+ "email": "me@localhost"
+ }
+ }
+ ],
+ "total_commits_count": 2
+} \ No newline at end of file