thin_man 0.15.9 → 0.15.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb59b80ee372136c2d30ce71712bf3f70cda3432
4
- data.tar.gz: d4756037bcad8774858773769303360c14bc702c
3
+ metadata.gz: d59634915ba675b156dc9e20e48f022f41d376a1
4
+ data.tar.gz: fd619ef1d16df6e258d269d770aad07d97855e75
5
5
  SHA512:
6
- metadata.gz: e0f1ccf59e2f46bd89b15cab567ef5d3f8f527f96ca53075639bb35af30b55cf6338ebea55cca01cb106815ed67224aa56bd17f813dfdc81cf9925aa5e1e894c
7
- data.tar.gz: 73dfdc654606498b54894f3277a9c23deec0d84baefc088d706d84143abaaaf846fcccdffaa50743fa84b91078df0fce1b67ce38207da63b91c3ee3de9c6f850
6
+ metadata.gz: 14a8d6afaac15c24f8810ea6394a2c654314d996a35d227ddb6f02b9442fdded26b9adea21ad4dffb175b90ecd383ddb9ee998abc6b5cf513f560786e7f3ec3d
7
+ data.tar.gz: 90c44c5232e10fc0642b8535370ca02667976fafcace427c73b0e308048591deab5f9495f38dc2e4ffd87d5dfb54744894d1cfe738a8b121db65eddd43c3d90e
@@ -522,6 +522,9 @@ var initThinMan = function(){
522
522
  }
523
523
  }
524
524
  },
525
+ getTrigger: function(){
526
+ this.trigger = this.jq_obj;
527
+ },
525
528
  getAjaxType: function(){
526
529
  return 'DELETE';
527
530
  },
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.15.9"
2
+ VERSION = "0.15.10"
3
3
  end
@@ -117,7 +117,18 @@ describe("thin_man", function(){
117
117
 
118
118
  });
119
119
 
120
-
120
+ describe("DeleteLink", function(){
121
+ it("submits an ajax delete call with options", function(){
122
+ var $link = affix('a[data-ajax-delete="true"][data-ajax-target="#test_dom_id"][href="/url"]');
123
+ var delete_link = new thin_man.DeleteLink($link)
124
+ spyOn($, 'ajax');
125
+ $link.click();
126
+ expect($.ajax).toHaveBeenCalled();
127
+ expect(delete_link.getAjaxType()).toEqual('DELETE')
128
+ expect(delete_link.getAjaxUrl()).toEqual('/url')
129
+ expect(delete_link.trigger).toEqual($link)
130
+ })
131
+ });
121
132
  describe("AjaxFormSubmission", function(){
122
133
  it("submits an ajax call with options", function(){
123
134
  var $form = affix('form[data-ajax-form="true"][method="PATCH"][action="/url"]');
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.9
4
+ version: 0.15.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut, Adam Bialek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-09 00:00:00.000000000 Z
11
+ date: 2016-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails