Sha256: 7082c50e5f19564c16686eea947ea1b8d648666e00c9b68f3f0da6b789a9748a
Contents?: true
Size: 1.15 KB
Versions: 8
Compression:
Stored size: 1.15 KB
Contents
require 'test_helper' class AudiosControllerTest < ActionController::TestCase fixtures :all setup do @audio = audios(:audio) @file = fixture_file_upload("/audios/audio.wav", "audio/wav", :binary) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:audios) end test "should get new" do get :new assert_response :success end test "should create audio" do assert_difference('Audio.count') do post :create, :audio => { :name => @audio.name, :file => @file } end assert_redirected_to audio_path(assigns(:audio)) end test "should show audio" do get :show, :id => @audio.id assert_response :success end test "should get edit" do get :edit, :id => @audio.id assert_response :success end test "should update audio" do put :update, :id => @audio.id, :audio => @audio.attributes assert_redirected_to audio_path(assigns(:audio)) end test "should destroy audio" do assert_difference('Audio.count', -1) do delete :destroy, :id => @audio.id end assert_redirected_to audios_path end end
Version data entries
8 entries across 8 versions & 1 rubygems