ticketmaster-zendesk 0.2.3 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.3.3
@@ -32,5 +32,9 @@ module TicketMaster::Provider
32
32
  end
33
33
  end
34
34
 
35
+ def valid?
36
+ ZendeskAPI::Search.find(:first, :params => {:query => "status:open"})
37
+ end
38
+
35
39
  end
36
40
  end
@@ -1,11 +1,22 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "Ticketmaster::Provider::Zendesk" do
4
-
5
- it "should be able to instantiate a new instance" do
4
+ before(:each) do
6
5
  @ticketmaster = TicketMaster.new(:zendesk, {:account => 'ticketmaster', :username => 'foo', :password => '000000'})
6
+ headers = {'Authorization' => 'Basic Zm9vOjAwMDAwMA==','Accept' => 'application/json'}
7
+ ActiveResource::HttpMock.respond_to do |mock|
8
+ mock.get '/search.json?query=status%3Aopen', headers, fixture_for('tickets', 'json'), 200
9
+ end
10
+
11
+ end
12
+
13
+ it "should be able to instantiate a new instance" do
7
14
  @ticketmaster.should be_an_instance_of(TicketMaster)
8
15
  @ticketmaster.should be_a_kind_of(TicketMaster::Provider::Zendesk)
9
16
  end
10
-
17
+
18
+ it "should be true with valid authentication" do
19
+ @ticketmaster.valid?.should be_true
20
+ end
21
+
11
22
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ticketmaster-zendesk}
8
- s.version = "0.2.3"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rafael George"]
12
- s.date = %q{2011-05-02}
12
+ s.date = %q{2011-06-06}
13
13
  s.description = %q{Allows ticketmaster to interact with Your System.}
14
14
  s.email = %q{george.rafael@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticketmaster-zendesk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
8
  - 3
10
- version: 0.2.3
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rafael George
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-02 00:00:00 -04:00
18
+ date: 2011-06-06 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency