Initial commit

This commit is contained in:
2013-04-29 22:55:08 -07:00
commit 067ebd998f
68 changed files with 1593 additions and 0 deletions
View File
+7
View File
@@ -0,0 +1,7 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
profile: MyString
two:
profile: MyString
View File
@@ -0,0 +1,49 @@
require 'test_helper'
class PaymentsControllerTest < ActionController::TestCase
setup do
@payment = payments(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:payments)
end
test "should get new" do
get :new
assert_response :success
end
test "should create payment" do
assert_difference('Payment.count') do
post :create, payment: { profile: @payment.profile }
end
assert_redirected_to payment_path(assigns(:payment))
end
test "should show payment" do
get :show, id: @payment
assert_response :success
end
test "should get edit" do
get :edit, id: @payment
assert_response :success
end
test "should update payment" do
put :update, id: @payment, payment: { profile: @payment.profile }
assert_redirected_to payment_path(assigns(:payment))
end
test "should destroy payment" do
assert_difference('Payment.count', -1) do
delete :destroy, id: @payment
end
assert_redirected_to payments_path
end
end
View File
+12
View File
@@ -0,0 +1,12 @@
require 'test_helper'
require 'rails/performance_test_help'
class BrowsingTest < ActionDispatch::PerformanceTest
# Refer to the documentation for all available options
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
# :output => 'tmp/performance', :formats => [:flat] }
def test_homepage
get '/'
end
end
+13
View File
@@ -0,0 +1,13 @@
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
fixtures :all
# Add more helper methods to be used by all tests here...
end
View File
@@ -0,0 +1,4 @@
require 'test_helper'
class PaymentsHelperTest < ActionView::TestCase
end
+7
View File
@@ -0,0 +1,7 @@
require 'test_helper'
class PaymentTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end