barcode update

This commit is contained in:
nandar
2018-07-26 09:33:20 +06:30
parent 004f801f71
commit 55554707f0
19 changed files with 36130 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
require 'test_helper'
class SellersControllerTest < ActionDispatch::IntegrationTest
setup do
@seller = sellers(:one)
end
test "should get index" do
get sellers_url
assert_response :success
end
test "should get new" do
get new_seller_url
assert_response :success
end
test "should create seller" do
assert_difference('Seller.count') do
post sellers_url, params: { seller: { address: @seller.address, email: @seller.email, key: @seller.key, name: @seller.name, phone: @seller.phone } }
end
assert_redirected_to seller_url(Seller.last)
end
test "should show seller" do
get seller_url(@seller)
assert_response :success
end
test "should get edit" do
get edit_seller_url(@seller)
assert_response :success
end
test "should update seller" do
patch seller_url(@seller), params: { seller: { address: @seller.address, email: @seller.email, key: @seller.key, name: @seller.name, phone: @seller.phone } }
assert_redirected_to seller_url(@seller)
end
test "should destroy seller" do
assert_difference('Seller.count', -1) do
delete seller_url(@seller)
end
assert_redirected_to sellers_url
end
end

15
test/fixtures/sellers.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
name: MyString
email: MyString
phone: MyString
address: MyString
key: MyString
two:
name: MyString
email: MyString
phone: MyString
address: MyString
key: MyString

View File

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