summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 21:00:52 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 21:00:52 +0100
commite76890d5f4634d47514a592d501d9792ae2ff7bb (patch)
tree0d257877fa5e5ba295affefd8fe76d3d3954996e /test
parent4b8dfcded36e1162346ee029d4bfc9c94323bdde (diff)
Different scaffold for GsParameter.
Diffstat (limited to 'test')
-rw-r--r--test/factories/gs_parameters.rb10
-rw-r--r--test/functional/gs_parameters_controller_test.rb8
-rw-r--r--test/unit/gs_parameter_test.rb6
-rw-r--r--test/unit/helpers/gs_parameters_helper_test.rb4
4 files changed, 7 insertions, 21 deletions
diff --git a/test/factories/gs_parameters.rb b/test/factories/gs_parameters.rb
deleted file mode 100644
index cc588e1..0000000
--- a/test/factories/gs_parameters.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# Read about factories at https://github.com/thoughtbot/factory_girl
-
-FactoryGirl.define do
- factory :gs_parameter do
- name "MyString"
- section "MyString"
- value "MyString"
- class_type "MyString"
- end
-end
diff --git a/test/functional/gs_parameters_controller_test.rb b/test/functional/gs_parameters_controller_test.rb
index 2436a69..a0e498a 100644
--- a/test/functional/gs_parameters_controller_test.rb
+++ b/test/functional/gs_parameters_controller_test.rb
@@ -25,23 +25,23 @@ class GsParametersControllerTest < ActionController::TestCase
end
test "should show gs_parameter" do
- get :show, id: @gs_parameter
+ get :show, id: @gs_parameter.to_param
assert_response :success
end
test "should get edit" do
- get :edit, id: @gs_parameter
+ get :edit, id: @gs_parameter.to_param
assert_response :success
end
test "should update gs_parameter" do
- put :update, id: @gs_parameter, gs_parameter: @gs_parameter.attributes
+ put :update, id: @gs_parameter.to_param, gs_parameter: @gs_parameter.attributes
assert_redirected_to gs_parameter_path(assigns(:gs_parameter))
end
test "should destroy gs_parameter" do
assert_difference('GsParameter.count', -1) do
- delete :destroy, id: @gs_parameter
+ delete :destroy, id: @gs_parameter.to_param
end
assert_redirected_to gs_parameters_path
diff --git a/test/unit/gs_parameter_test.rb b/test/unit/gs_parameter_test.rb
index bc7768f..2e3793a 100644
--- a/test/unit/gs_parameter_test.rb
+++ b/test/unit/gs_parameter_test.rb
@@ -1,7 +1,7 @@
require 'test_helper'
class GsParameterTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
+ def test_should_be_valid
+ assert GsParameter.new.valid?
+ end
end
diff --git a/test/unit/helpers/gs_parameters_helper_test.rb b/test/unit/helpers/gs_parameters_helper_test.rb
deleted file mode 100644
index d7653e0..0000000
--- a/test/unit/helpers/gs_parameters_helper_test.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class GsParametersHelperTest < ActionView::TestCase
-end