Skip to content

Commit 8f7cd89

Browse files
committed
Merge pull request #79 from KevinSjoberg/feature/remove-redundant-tests
Remove redundant tests
2 parents ed3c705 + 04c4761 commit 8f7cd89

File tree

1 file changed

+0
-79
lines changed

1 file changed

+0
-79
lines changed

spec/client_spec.rb

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -3,85 +3,6 @@
33
require 'em-http'
44

55
describe Pusher do
6-
describe 'using multiple Client objects' do
7-
before :each do
8-
@client1 = Pusher::Client.new
9-
@client2 = Pusher::Client.new
10-
11-
@client1.scheme = 'ws'
12-
@client2.scheme = 'wss'
13-
@client1.host = 'one'
14-
@client2.host = 'two'
15-
@client1.port = 81
16-
@client2.port = 82
17-
@client1.app_id = '1111'
18-
@client2.app_id = '2222'
19-
@client1.key = 'AAAA'
20-
@client2.key = 'BBBB'
21-
@client1.secret = 'aaaaaaaa'
22-
@client2.secret = 'bbbbbbbb'
23-
end
24-
25-
it "default should be configured automatically from environment variable" do
26-
expect(Pusher.default_client.url.host).to eq("api.secret.pusherapp.com")
27-
end
28-
29-
it "should send scheme messages to different objects" do
30-
expect(@client1.scheme).not_to eq(@client2.scheme)
31-
end
32-
33-
it "should send host messages to different objects" do
34-
expect(@client1.host).not_to eq(@client2.host)
35-
end
36-
37-
it "should send port messages to different objects" do
38-
expect(@client1.port).not_to eq(@client2.port)
39-
end
40-
41-
it "should send app_id messages to different objects" do
42-
expect(@client1.app_id).not_to eq(@client2.app_id)
43-
end
44-
45-
it "should send app_id messages to different objects" do
46-
expect(@client1.key).not_to eq(@client2.key)
47-
end
48-
49-
it "should send app_id messages to different objects" do
50-
expect(@client1.secret).not_to eq(@client2.secret)
51-
end
52-
53-
it "should send app_id messages to different objects" do
54-
expect(@client1.authentication_token.key).not_to eq(@client2.authentication_token.key)
55-
expect(@client1.authentication_token.secret).not_to eq(@client2.authentication_token.secret)
56-
end
57-
58-
it "should send url messages to different objects" do
59-
expect(@client1.url.to_s).not_to eq(@client2.url.to_s)
60-
@client1.url = 'ws://one/apps/111'
61-
@client2.url = 'wss://two/apps/222'
62-
expect(@client1.scheme).not_to eq(@client2.scheme)
63-
expect(@client1.host).not_to eq(@client2.host)
64-
expect(@client1.app_id).not_to eq(@client2.app_id)
65-
end
66-
67-
it "should send encrypted messages to different objects" do
68-
@client1.encrypted = false
69-
@client2.encrypted = true
70-
expect(@client1.scheme).not_to eq(@client2.scheme)
71-
expect(@client1.port).not_to eq(@client2.port)
72-
end
73-
74-
it "should send [] messages to different objects" do
75-
expect(@client1['test']).not_to eq(@client2['test'])
76-
end
77-
78-
it "should send http_proxy messages to different objects" do
79-
@client1.http_proxy = 'http://oneuser:onepassword@onehost:8080'
80-
@client2.http_proxy = 'http://twouser:twopassword@twohost:8880'
81-
expect(@client1.http_proxy).not_to eq(@client2.http_proxy)
82-
end
83-
end
84-
856
# The behaviour should be the same when using the Client object, or the
867
# 'global' client delegated through the Pusher class
878
[lambda { Pusher }, lambda { Pusher::Client.new }].each do |client_gen|

0 commit comments

Comments
 (0)