summaryrefslogtreecommitdiffstats
path: root/models/fixtures
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-01-25 05:37:35 -0500
committerLunny Xiao <xiaolunwen@gmail.com>2017-01-25 18:37:35 +0800
commit0934d1b1ea4f3cab5af5555116ae13a87c65f34c (patch)
tree8d05aa5b330f2a33f50313881e5dee0815d43815 /models/fixtures
parenta6832c234d5c73cfa00cb4a926f446e0b14b9732 (diff)
downloadgitea-0934d1b1ea4f3cab5af5555116ae13a87c65f34c.tar.gz
gitea-0934d1b1ea4f3cab5af5555116ae13a87c65f34c.zip
Bug fixes and unit tests for models/webhook (#751)
Diffstat (limited to 'models/fixtures')
-rw-r--r--models/fixtures/hook_task.yml5
-rw-r--r--models/fixtures/webhook.yml24
2 files changed, 29 insertions, 0 deletions
diff --git a/models/fixtures/hook_task.yml b/models/fixtures/hook_task.yml
new file mode 100644
index 0000000000..151fe250f2
--- /dev/null
+++ b/models/fixtures/hook_task.yml
@@ -0,0 +1,5 @@
+-
+ id: 1
+ repo_id: 1
+ hook_id: 1
+ uuid: uuid1
diff --git a/models/fixtures/webhook.yml b/models/fixtures/webhook.yml
new file mode 100644
index 0000000000..11d7439cf4
--- /dev/null
+++ b/models/fixtures/webhook.yml
@@ -0,0 +1,24 @@
+-
+ id: 1
+ repo_id: 1
+ url: www.example.com/url1
+ content_type: 1 # json
+ events: '{"push_only":true,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":false}}'
+ is_active: true
+
+-
+ id: 2
+ repo_id: 1
+ url: www.example.com/url2
+ content_type: 1 # json
+ events: '{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}'
+ is_active: false
+
+-
+ id: 3
+ org_id: 3
+ repo_id: 3
+ url: www.example.com/url3
+ content_type: 1 # json
+ events: '{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}'
+ is_active: true