robocall 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/app/controllers/robocall/robocalls_controller.rb +4 -2
- data/app/views/robocall/robocalls/connected_to_caller.xml.haml +3 -0
- data/app/views/robocall/robocalls/error.xml.haml +5 -5
- data/lib/robocall.rb +5 -1
- data/lib/robocall/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +228 -0
- data/spec/dummy/log/test.log +831 -0
- data/spec/lib/robocall_spec.rb +11 -9
- metadata +1 -1
data/spec/lib/robocall_spec.rb
CHANGED
@@ -2,17 +2,19 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'robocall' do
|
4
4
|
|
5
|
-
|
5
|
+
Robocall.sid = 'x'
|
6
|
+
Robocall.auth_token = 'x'
|
7
|
+
Robocall.from_phone_number = '555 555 5555'
|
8
|
+
Robocall.base_path = "http://localhost:3000"
|
9
|
+
|
10
|
+
before(:each) do
|
11
|
+
@twilio = double('Twilio')
|
12
|
+
@twilio.stub_chain(:account, :calls, :create).and_return(true)
|
13
|
+
Robocall.stub(:get_twilio).and_return(@twilio)
|
14
|
+
end
|
6
15
|
|
7
16
|
it 'should create a record' do
|
8
|
-
|
9
|
-
Robocall.sid = 'x'
|
10
|
-
Robocall.auth_token = 'x'
|
11
|
-
Robocall.from_phone_number = '555 555 5555'
|
12
|
-
Robocall.base_path = "http://localhost:3000"
|
13
|
-
# Needs mocking
|
14
|
-
# Robocall.send_robocall(to: "555 555 5555", text: "Hello you there")
|
15
|
-
|
17
|
+
Robocall.send_robocall(to: "555 555 5555", text: "Hello you there")
|
16
18
|
end
|
17
19
|
|
18
20
|
end
|