removed special offer id from items

This commit is contained in:
Senad Uka
2015-03-21 06:30:18 +01:00
parent 88c53a8512
commit 38548e3e33
11 changed files with 285 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class DeliveryTimeEstimationsControllerTest < ActionController::TestCase
setup do
@delivery_time_estimation = delivery_time_estimations(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:delivery_time_estimations)
end
test "should get new" do
get :new
assert_response :success
end
test "should create delivery_time_estimation" do
assert_difference('DeliveryTimeEstimation.count') do
post :create, delivery_time_estimation: { duration_in_days: @delivery_time_estimation.duration_in_days, name: @delivery_time_estimation.name }
end
assert_redirected_to delivery_time_estimation_path(assigns(:delivery_time_estimation))
end
test "should show delivery_time_estimation" do
get :show, id: @delivery_time_estimation
assert_response :success
end
test "should get edit" do
get :edit, id: @delivery_time_estimation
assert_response :success
end
test "should update delivery_time_estimation" do
patch :update, id: @delivery_time_estimation, delivery_time_estimation: { duration_in_days: @delivery_time_estimation.duration_in_days, name: @delivery_time_estimation.name }
assert_redirected_to delivery_time_estimation_path(assigns(:delivery_time_estimation))
end
test "should destroy delivery_time_estimation" do
assert_difference('DeliveryTimeEstimation.count', -1) do
delete :destroy, id: @delivery_time_estimation
end
assert_redirected_to delivery_time_estimations_path
end
end

View File

@@ -0,0 +1,9 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
name: MyString
duration_in_days: 1
two:
name: MyString
duration_in_days: 1

View File

@@ -0,0 +1,7 @@
require 'test_helper'
class DeliveryTimeEstimationTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end