blob: f0f04f6fc884a87f6d877fb61a8a3fa322792c3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
require 'test_helper'
class RingtonesControllerTest < ActionController::TestCase
setup do
@ringtone = ringtones(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:ringtones)
end
test "should get new" do
get :new
assert_response :success
end
test "should create ringtone" do
assert_difference('Ringtone.count') do
post :create, ringtone: @ringtone.attributes
end
assert_redirected_to ringtone_path(assigns(:ringtone))
end
test "should show ringtone" do
get :show, id: @ringtone.to_param
assert_response :success
end
test "should get edit" do
get :edit, id: @ringtone.to_param
assert_response :success
end
test "should update ringtone" do
put :update, id: @ringtone.to_param, ringtone: @ringtone.attributes
assert_redirected_to ringtone_path(assigns(:ringtone))
end
test "should destroy ringtone" do
assert_difference('Ringtone.count', -1) do
delete :destroy, id: @ringtone.to_param
end
assert_redirected_to ringtones_path
end
end
|