Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

deposit 관련 내용 추가

  • Loading branch information...
commit 037a89bb483b30230b0e02bc9c1a2b29a3babecd 1 parent 1e88174
@youngmin authored
Showing with 288 additions and 254 deletions.
  1. +1 −0  app/controllers/action_customs_controller.rb
  2. +83 −0 app/controllers/deposit_thresholds_controller.rb
  3. +7 −0 app/controllers/deposits_controller.rb
  4. +3 −3 app/controllers/products_controller.rb
  5. +0 −83 app/controllers/sub_deposits_controller.rb
  6. +2 −0  app/helpers/deposit_thresholds_helper.rb
  7. +0 −2  app/helpers/sub_deposits_helper.rb
  8. +2 −0  app/models/deposit_threshold.rb
  9. +0 −5 app/models/sub_deposit.rb
  10. +5 −1 app/views/action_custom_factors/edit.html.erb
  11. +3 −1 app/views/action_custom_factors/index.html.erb
  12. +1 −1  app/views/action_custom_factors/new.html.erb
  13. +6 −1 app/views/action_custom_factors/show.html.erb
  14. +5 −1 app/views/action_customs/edit.html.erb
  15. +5 −1 app/views/action_customs/index.html.erb
  16. +5 −1 app/views/action_customs/new.html.erb
  17. +10 −1 app/views/action_customs/show.html.erb
  18. +24 −0 app/views/deposit_thresholds/edit.html.erb
  19. +24 −0 app/views/deposit_thresholds/index.html.erb
  20. +5 −5 app/views/{sub_deposits → deposit_thresholds}/new.html.erb
  21. +18 −0 app/views/deposit_thresholds/show.html.erb
  22. +1 −1  app/views/layouts/{sub_deposits.html.erb → deposit_thresholds.html.erb}
  23. +0 −28 app/views/sub_deposits/edit.html.erb
  24. +0 −26 app/views/sub_deposits/index.html.erb
  25. +0 −23 app/views/sub_deposits/show.html.erb
  26. +2 −2 config/routes.rb
  27. +0 −15 db/migrate/20111104011449_create_sub_deposits.rb
  28. +15 −0 db/migrate/20111104051052_create_deposit_thresholds.rb
  29. +9 −1 db/schema.rb
  30. +2 −2 test/fixtures/{sub_deposits.yml → deposit_thresholds.yml}
  31. +45 −0 test/functional/deposit_thresholds_controller_test.rb
  32. +0 −45 test/functional/sub_deposits_controller_test.rb
  33. +1 −1  test/unit/{sub_deposit_test.rb → deposit_threshold_test.rb}
  34. +4 −0 test/unit/helpers/deposit_thresholds_helper_test.rb
  35. +0 −4 test/unit/helpers/sub_deposits_helper_test.rb
View
1  app/controllers/action_customs_controller.rb
@@ -8,6 +8,7 @@ def index
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @action_customs }
+ format.json { render :json => @action_customs }
end
end
View
83 app/controllers/deposit_thresholds_controller.rb
@@ -0,0 +1,83 @@
+class DepositThresholdsController < ApplicationController
+ # GET /deposit_thresholds
+ # GET /deposit_thresholds.xml
+ def index
+ @deposit_thresholds = DepositThreshold.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @deposit_thresholds }
+ end
+ end
+
+ # GET /deposit_thresholds/1
+ # GET /deposit_thresholds/1.xml
+ def show
+ @deposit_threshold = DepositThreshold.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @deposit_threshold }
+ end
+ end
+
+ # GET /deposit_thresholds/new
+ # GET /deposit_thresholds/new.xml
+ def new
+ @deposit_threshold = DepositThreshold.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @deposit_threshold }
+ end
+ end
+
+ # GET /deposit_thresholds/1/edit
+ def edit
+ @deposit_threshold = DepositThreshold.find(params[:id])
+ end
+
+ # POST /deposit_thresholds
+ # POST /deposit_thresholds.xml
+ def create
+ @deposit_threshold = DepositThreshold.new(params[:deposit_threshold])
+
+ respond_to do |format|
+ if @deposit_threshold.save
+ format.html { redirect_to(@deposit_threshold, :notice => 'DepositThreshold was successfully created.') }
+ format.xml { render :xml => @deposit_threshold, :status => :created, :location => @deposit_threshold }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @deposit_threshold.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /deposit_thresholds/1
+ # PUT /deposit_thresholds/1.xml
+ def update
+ @deposit_threshold = DepositThreshold.find(params[:id])
+
+ respond_to do |format|
+ if @deposit_threshold.update_attributes(params[:deposit_threshold])
+ format.html { redirect_to(@deposit_threshold, :notice => 'DepositThreshold was successfully updated.') }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @deposit_threshold.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /deposit_thresholds/1
+ # DELETE /deposit_thresholds/1.xml
+ def destroy
+ @deposit_threshold = DepositThreshold.find(params[:id])
+ @deposit_threshold.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(deposit_thresholds_url) }
+ format.xml { head :ok }
+ end
+ end
+end
View
7 app/controllers/deposits_controller.rb
@@ -7,6 +7,7 @@ def index
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @deposits }
+ format.json { render :json => @deposits }
end
end
@@ -18,6 +19,7 @@ def show
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @deposit }
+ format.json { render :json => @deposit }
end
end
@@ -46,9 +48,11 @@ def create
if @deposit.save
format.html { redirect_to(@deposit, :notice => 'Deposit was successfully created.') }
format.xml { render :xml => @deposit, :status => :created, :location => @deposit }
+ format.json { render :json => @deposit, :status => :created, :location => @deposit }
else
format.html { render :action => "new" }
format.xml { render :xml => @deposit.errors, :status => :unprocessable_entity }
+ format.json { render :json => @deposit.errors, :status => :unprocessable_entity }
end
end
end
@@ -62,9 +66,11 @@ def update
if @deposit.update_attributes(params[:deposit])
format.html { redirect_to(@deposit, :notice => 'Deposit was successfully updated.') }
format.xml { head :ok }
+ format.json { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @deposit.errors, :status => :unprocessable_entity }
+ format.json { render :json => @deposit.errors, :status => :unprocessable_entity }
end
end
end
@@ -78,6 +84,7 @@ def destroy
respond_to do |format|
format.html { redirect_to(deposits_url) }
format.xml { head :ok }
+ format.json { head :ok }
end
end
end
View
6 app/controllers/products_controller.rb
@@ -165,11 +165,11 @@ def update
@prd_attribute = @product.prd_attribute
# send_to_cs(@product.prd_attribute, @product.prd_subscriptions, @product.prd_promotions, @product.prd_additional_services )
- f = open("http://localhost:3000/ccbs_products/"+@prd_attribute.id.to_s+'.json')
+ #f = open("http://localhost:3000/ccbs_products/"+@prd_attribute.id.to_s+'.json')
#debugger
- webpage = f.read
- f.close
+ #webpage = f.read
+ #f.close
#make_rules(product_id, @product.prd_attribute.name)
end
View
83 app/controllers/sub_deposits_controller.rb
@@ -1,83 +0,0 @@
-class SubDepositsController < ApplicationController
- # GET /sub_deposits
- # GET /sub_deposits.xml
- def index
- @sub_deposits = SubDeposit.all
-
- respond_to do |format|
- format.html # index.html.erb
- format.xml { render :xml => @sub_deposits }
- end
- end
-
- # GET /sub_deposits/1
- # GET /sub_deposits/1.xml
- def show
- @sub_deposit = SubDeposit.find(params[:id])
-
- respond_to do |format|
- format.html # show.html.erb
- format.xml { render :xml => @sub_deposit }
- end
- end
-
- # GET /sub_deposits/new
- # GET /sub_deposits/new.xml
- def new
- @sub_deposit = SubDeposit.new
-
- respond_to do |format|
- format.html # new.html.erb
- format.xml { render :xml => @sub_deposit }
- end
- end
-
- # GET /sub_deposits/1/edit
- def edit
- @sub_deposit = SubDeposit.find(params[:id])
- end
-
- # POST /sub_deposits
- # POST /sub_deposits.xml
- def create
- @sub_deposit = SubDeposit.new(params[:sub_deposit])
-
- respond_to do |format|
- if @sub_deposit.save
- format.html { redirect_to(@sub_deposit, :notice => 'SubDeposit was successfully created.') }
- format.xml { render :xml => @sub_deposit, :status => :created, :location => @sub_deposit }
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @sub_deposit.errors, :status => :unprocessable_entity }
- end
- end
- end
-
- # PUT /sub_deposits/1
- # PUT /sub_deposits/1.xml
- def update
- @sub_deposit = SubDeposit.find(params[:id])
-
- respond_to do |format|
- if @sub_deposit.update_attributes(params[:sub_deposit])
- format.html { redirect_to(@sub_deposit, :notice => 'SubDeposit was successfully updated.') }
- format.xml { head :ok }
- else
- format.html { render :action => "edit" }
- format.xml { render :xml => @sub_deposit.errors, :status => :unprocessable_entity }
- end
- end
- end
-
- # DELETE /sub_deposits/1
- # DELETE /sub_deposits/1.xml
- def destroy
- @sub_deposit = SubDeposit.find(params[:id])
- @sub_deposit.destroy
-
- respond_to do |format|
- format.html { redirect_to(sub_deposits_url) }
- format.xml { head :ok }
- end
- end
-end
View
2  app/helpers/deposit_thresholds_helper.rb
@@ -0,0 +1,2 @@
+module DepositThresholdsHelper
+end
View
2  app/helpers/sub_deposits_helper.rb
@@ -1,2 +0,0 @@
-module SubDepositsHelper
-end
View
2  app/models/deposit_threshold.rb
@@ -0,0 +1,2 @@
+class DepositThreshold < ActiveRecord::Base
+end
View
5 app/models/sub_deposit.rb
@@ -1,5 +0,0 @@
-class SubDeposit < ActiveRecord::Base
- belongs_to :deposit,
- :class_name => 'Deposit',
- :foreign_key => 'deposit_id'
-end
View
6 app/views/action_custom_factors/edit.html.erb
@@ -4,6 +4,10 @@
<%= f.error_messages %>
<p>
+ <%= f.label :id %><br />
+ <%= f.text_field :id %>
+ </p>
+ <p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
@@ -25,4 +29,4 @@
<% end %>
<%= link_to 'Show', @action_custom_factor %> |
-<%= link_to 'Back', action_custom_factors_path %>
+<%= link_to 'Back', action_custom_factors_path %>
View
4 app/views/action_custom_factors/index.html.erb
@@ -2,6 +2,7 @@
<table>
<tr>
+ <th>Id</th>
<th>Name</th>
<th>Value</th>
<th>Operation</th>
@@ -10,6 +11,7 @@
<% @action_custom_factors.each do |action_custom_factor| %>
<tr>
+ <td><%=h action_custom_factor.id %></td>
<td><%=h action_custom_factor.name %></td>
<td><%=h action_custom_factor.value %></td>
<td><%=h action_custom_factor.operation %></td>
@@ -23,4 +25,4 @@
<br />
-<%= link_to 'New action_custom_factor', new_action_custom_factor_path %>
+<%= link_to 'New action_custom_factor', new_action_custom_factor_path %>
View
2  app/views/action_custom_factors/new.html.erb
@@ -24,4 +24,4 @@
</p>
<% end %>
-<%= link_to 'Back', action_custom_factors_path %>
+<%= link_to 'Back', action_custom_factors_path %>
View
7 app/views/action_custom_factors/show.html.erb
@@ -1,4 +1,9 @@
<p>
+ <b>Id:</b>
+ <%=h @action_custom_factor.id %>
+</p>
+
+<p>
<b>Name:</b>
<%=h @action_custom_factor.name %>
</p>
@@ -20,4 +25,4 @@
<%= link_to 'Edit', edit_action_custom_factor_path(@action_custom_factor) %> |
-<%= link_to 'Back', action_custom_factors_path %>
+<%= link_to 'Back', action_custom_factors_path %>
View
6 app/views/action_customs/edit.html.erb
@@ -12,9 +12,13 @@
<%= f.text_field :subfctr_code %>
</p>
<p>
+ <%= f.label :description %><br />
+ <%= f.text_field :description %>
+ </p>
+ <p>
<%= f.submit 'Update' %>
</p>
<% end %>
<%= link_to 'Show', @action_custom %> |
-<%= link_to 'Back', action_customs_path %>
+<%= link_to 'Back', action_customs_path %>
View
6 app/views/action_customs/index.html.erb
@@ -2,14 +2,18 @@
<table>
<tr>
+ <th>Id</th>
<th>Subfctr name</th>
<th>Subfctr code</th>
+ <th>Description</th>
</tr>
<% @action_customs.each do |action_custom| %>
<tr>
+ <td><%=h action_custom.id %></td>
<td><%=h action_custom.subfctr_name %></td>
<td><%=h action_custom.subfctr_code %></td>
+ <td><%=h action_custom.description %></td>
<td><%= link_to 'Show', action_custom %></td>
<td><%= link_to 'Edit', edit_action_custom_path(action_custom) %></td>
<td><%= link_to 'Destroy', action_custom, :confirm => 'Are you sure?', :method => :delete %></td>
@@ -19,4 +23,4 @@
<br />
-<%= link_to 'New action_custom', new_action_custom_path %>
+<%= link_to 'New action_custom', new_action_custom_path %>
View
6 app/views/action_customs/new.html.erb
@@ -12,8 +12,12 @@
<%= f.text_field :subfctr_code %>
</p>
<p>
+ <%= f.label :description %><br />
+ <%= f.text_field :description %>
+ </p>
+ <p>
<%= f.submit 'Create' %>
</p>
<% end %>
-<%= link_to 'Back', action_customs_path %>
+<%= link_to 'Back', action_customs_path %>
View
11 app/views/action_customs/show.html.erb
@@ -1,4 +1,9 @@
<p>
+ <b>Id :</b>
+ <%=h @action_custom.id %>
+</p>
+
+<p>
<b>Subfctr name:</b>
<%=h @action_custom.subfctr_name %>
</p>
@@ -8,6 +13,10 @@
<%=h @action_custom.subfctr_code %>
</p>
+<p>
+ <b>Description:</b>
+ <%=h @action_custom.description %>
+</p>
<%= link_to 'Edit', edit_action_custom_path(@action_custom) %> |
-<%= link_to 'Back', action_customs_path %>
+<%= link_to 'Back', action_customs_path %>
View
24 app/views/deposit_thresholds/edit.html.erb
@@ -0,0 +1,24 @@
+<h1>Editing deposit_threshold</h1>
+
+<% form_for(@deposit_threshold) do |f| %>
+ <%= f.error_messages %>
+
+ <p>
+ <%= f.label :threhold %><br />
+ <%= f.text_field :threhold %>
+ </p>
+ <p>
+ <%= f.label :action %><br />
+ <%= f.text_field :action %>
+ </p>
+ <p>
+ <%= f.label :deposit_id %><br />
+ <%= f.text_field :deposit_id %>
+ </p>
+ <p>
+ <%= f.submit 'Update' %>
+ </p>
+<% end %>
+
+<%= link_to 'Show', @deposit_threshold %> |
+<%= link_to 'Back', deposit_thresholds_path %>
View
24 app/views/deposit_thresholds/index.html.erb
@@ -0,0 +1,24 @@
+<h1>Listing deposit_thresholds</h1>
+
+<table>
+ <tr>
+ <th>Threhold</th>
+ <th>Action</th>
+ <th>Deposit</th>
+ </tr>
+
+<% @deposit_thresholds.each do |deposit_threshold| %>
+ <tr>
+ <td><%=h deposit_threshold.threhold %></td>
+ <td><%=h deposit_threshold.action %></td>
+ <td><%=h deposit_threshold.deposit_id %></td>
+ <td><%= link_to 'Show', deposit_threshold %></td>
+ <td><%= link_to 'Edit', edit_deposit_threshold_path(deposit_threshold) %></td>
+ <td><%= link_to 'Destroy', deposit_threshold, :confirm => 'Are you sure?', :method => :delete %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New deposit_threshold', new_deposit_threshold_path %>
View
10 app/views/sub_deposits/new.html.erb → app/views/deposit_thresholds/new.html.erb
@@ -1,11 +1,11 @@
-<h1>New sub_deposit</h1>
+<h1>New deposit_threshold</h1>
-<% form_for(@sub_deposit) do |f| %>
+<% form_for(@deposit_threshold) do |f| %>
<%= f.error_messages %>
<p>
- <%= f.label :threshold %><br />
- <%= f.text_field :threshold %>
+ <%= f.label :threhold %><br />
+ <%= f.text_field :threhold %>
</p>
<p>
<%= f.label :action %><br />
@@ -20,4 +20,4 @@
</p>
<% end %>
-<%= link_to 'Back', sub_deposits_path %>
+<%= link_to 'Back', deposit_thresholds_path %>
View
18 app/views/deposit_thresholds/show.html.erb
@@ -0,0 +1,18 @@
+<p>
+ <b>Threhold:</b>
+ <%=h @deposit_threshold.threhold %>
+</p>
+
+<p>
+ <b>Action:</b>
+ <%=h @deposit_threshold.action %>
+</p>
+
+<p>
+ <b>Deposit:</b>
+ <%=h @deposit_threshold.deposit_id %>
+</p>
+
+
+<%= link_to 'Edit', edit_deposit_threshold_path(@deposit_threshold) %> |
+<%= link_to 'Back', deposit_thresholds_path %>
View
2  app/views/layouts/sub_deposits.html.erb → app/views/layouts/deposit_thresholds.html.erb
@@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
- <title>SubDeposits: <%= controller.action_name %></title>
+ <title>DepositThresholds: <%= controller.action_name %></title>
<%= stylesheet_link_tag 'scaffold' %>
</head>
<body>
View
28 app/views/sub_deposits/edit.html.erb
@@ -1,28 +0,0 @@
-<h1>Editing sub_deposit</h1>
-
-<% form_for(@sub_deposit) do |f| %>
- <%= f.error_messages %>
-
- <p>
- <%= f.label :id %><br />
- <%= f.text_field :id %>
- </p>
- <p>
- <%= f.label :threshold %><br />
- <%= f.text_field :threshold %>
- </p>
- <p>
- <%= f.label :action %><br />
- <%= f.text_field :action %>
- </p>
- <p>
- <%= f.label :deposit_id %><br />
- <%= f.text_field :deposit_id %>
- </p>
- <p>
- <%= f.submit 'Update' %>
- </p>
-<% end %>
-
-<%= link_to 'Show', @sub_deposit %> |
-<%= link_to 'Back', sub_deposits_path %>
View
26 app/views/sub_deposits/index.html.erb
@@ -1,26 +0,0 @@
-<h1>Listing sub_deposits</h1>
-
-<table>
- <tr>
- <th>Id</th>
- <th>Threshold</th>
- <th>Action</th>
- <th>Deposit</th>
- </tr>
-
-<% @sub_deposits.each do |sub_deposit| %>
- <tr>
- <td><%=h sub_deposit.id %></td>
- <td><%=h sub_deposit.threshold %></td>
- <td><%=h sub_deposit.action %></td>
- <td><%=h sub_deposit.deposit_id %></td>
- <td><%= link_to 'Show', sub_deposit %></td>
- <td><%= link_to 'Edit', edit_sub_deposit_path(sub_deposit) %></td>
- <td><%= link_to 'Destroy', sub_deposit, :confirm => 'Are you sure?', :method => :delete %></td>
- </tr>
-<% end %>
-</table>
-
-<br />
-
-<%= link_to 'New sub_deposit', new_sub_deposit_path %>
View
23 app/views/sub_deposits/show.html.erb
@@ -1,23 +0,0 @@
-<p>
- <b>Id:</b>
- <%=h @sub_deposit.id %>
-</p>
-
-<p>
- <b>Threshold:</b>
- <%=h @sub_deposit.threshold %>
-</p>
-
-<p>
- <b>Action:</b>
- <%=h @sub_deposit.action %>
-</p>
-
-<p>
- <b>Deposit:</b>
- <%=h @sub_deposit.deposit_id %>
-</p>
-
-
-<%= link_to 'Edit', edit_sub_deposit_path(@sub_deposit) %> |
-<%= link_to 'Back', sub_deposits_path %>
View
4 config/routes.rb
@@ -1,10 +1,10 @@
ActionController::Routing::Routes.draw do |map|
+ map.resources :deposit_thresholds
+
map.resources :dbs_deposit_thresholds
map.resources :dbs_deposits
- map.resources :sub_deposits
-
map.resources :deposits
map.resources :sub_relations
View
15 db/migrate/20111104011449_create_sub_deposits.rb
@@ -1,15 +0,0 @@
-class CreateSubDeposits < ActiveRecord::Migration
- def self.up
- create_table :sub_deposits do |t|
- t.integer :threshold
- t.string :action
- t.integer :deposit_id
-
- t.timestamps
- end
- end
-
- def self.down
- drop_table :sub_deposits
- end
-end
View
15 db/migrate/20111104051052_create_deposit_thresholds.rb
@@ -0,0 +1,15 @@
+class CreateDepositThresholds < ActiveRecord::Migration
+ def self.up
+ create_table :deposit_thresholds do |t|
+ t.integer :threhold
+ t.string :action
+ t.integer :deposit_id
+
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :deposit_thresholds
+ end
+end
View
10 db/schema.rb
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20111104020134) do
+ActiveRecord::Schema.define(:version => 20111104051052) do
create_table "action_allows", :force => true do |t|
t.string "subfctr_name"
@@ -249,6 +249,14 @@
t.datetime "updated_at"
end
+ create_table "deposit_thresholds", :force => true do |t|
+ t.integer "threhold"
+ t.string "action"
+ t.integer "deposit_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "deposits", :force => true do |t|
t.integer "product_id"
t.integer "balance_id"
View
4 test/fixtures/sub_deposits.yml → test/fixtures/deposit_thresholds.yml
@@ -1,11 +1,11 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
- threshold: 1
+ threhold: 1
action: MyString
deposit_id: 1
two:
- threshold: 1
+ threhold: 1
action: MyString
deposit_id: 1
View
45 test/functional/deposit_thresholds_controller_test.rb
@@ -0,0 +1,45 @@
+require 'test_helper'
+
+class DepositThresholdsControllerTest < ActionController::TestCase
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:deposit_thresholds)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create deposit_threshold" do
+ assert_difference('DepositThreshold.count') do
+ post :create, :deposit_threshold => { }
+ end
+
+ assert_redirected_to deposit_threshold_path(assigns(:deposit_threshold))
+ end
+
+ test "should show deposit_threshold" do
+ get :show, :id => deposit_thresholds(:one).to_param
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, :id => deposit_thresholds(:one).to_param
+ assert_response :success
+ end
+
+ test "should update deposit_threshold" do
+ put :update, :id => deposit_thresholds(:one).to_param, :deposit_threshold => { }
+ assert_redirected_to deposit_threshold_path(assigns(:deposit_threshold))
+ end
+
+ test "should destroy deposit_threshold" do
+ assert_difference('DepositThreshold.count', -1) do
+ delete :destroy, :id => deposit_thresholds(:one).to_param
+ end
+
+ assert_redirected_to deposit_thresholds_path
+ end
+end
View
45 test/functional/sub_deposits_controller_test.rb
@@ -1,45 +0,0 @@
-require 'test_helper'
-
-class SubDepositsControllerTest < ActionController::TestCase
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:sub_deposits)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create sub_deposit" do
- assert_difference('SubDeposit.count') do
- post :create, :sub_deposit => { }
- end
-
- assert_redirected_to sub_deposit_path(assigns(:sub_deposit))
- end
-
- test "should show sub_deposit" do
- get :show, :id => sub_deposits(:one).to_param
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, :id => sub_deposits(:one).to_param
- assert_response :success
- end
-
- test "should update sub_deposit" do
- put :update, :id => sub_deposits(:one).to_param, :sub_deposit => { }
- assert_redirected_to sub_deposit_path(assigns(:sub_deposit))
- end
-
- test "should destroy sub_deposit" do
- assert_difference('SubDeposit.count', -1) do
- delete :destroy, :id => sub_deposits(:one).to_param
- end
-
- assert_redirected_to sub_deposits_path
- end
-end
View
2  test/unit/sub_deposit_test.rb → test/unit/deposit_threshold_test.rb
@@ -1,6 +1,6 @@
require 'test_helper'
-class SubDepositTest < ActiveSupport::TestCase
+class DepositThresholdTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
View
4 test/unit/helpers/deposit_thresholds_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class DepositThresholdsHelperTest < ActionView::TestCase
+end
View
4 test/unit/helpers/sub_deposits_helper_test.rb
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class SubDepositsHelperTest < ActionView::TestCase
-end
Please sign in to comment.
Something went wrong with that request. Please try again.