summaryrefslogtreecommitdiff
path: root/test/functional/phone_sip_accounts_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/phone_sip_accounts_controller_test.rb')
-rw-r--r--test/functional/phone_sip_accounts_controller_test.rb49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/functional/phone_sip_accounts_controller_test.rb b/test/functional/phone_sip_accounts_controller_test.rb
new file mode 100644
index 0000000..37a3219
--- /dev/null
+++ b/test/functional/phone_sip_accounts_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class PhoneSipAccountsControllerTest < ActionController::TestCase
+ setup do
+ @phone_sip_account = phone_sip_accounts(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:phone_sip_accounts)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create phone_sip_account" do
+ assert_difference('PhoneSipAccount.count') do
+ post :create, phone_sip_account: @phone_sip_account.attributes
+ end
+
+ assert_redirected_to phone_sip_account_path(assigns(:phone_sip_account))
+ end
+
+ test "should show phone_sip_account" do
+ get :show, id: @phone_sip_account.to_param
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @phone_sip_account.to_param
+ assert_response :success
+ end
+
+ test "should update phone_sip_account" do
+ put :update, id: @phone_sip_account.to_param, phone_sip_account: @phone_sip_account.attributes
+ assert_redirected_to phone_sip_account_path(assigns(:phone_sip_account))
+ end
+
+ test "should destroy phone_sip_account" do
+ assert_difference('PhoneSipAccount.count', -1) do
+ delete :destroy, id: @phone_sip_account.to_param
+ end
+
+ assert_redirected_to phone_sip_accounts_path
+ end
+end