Class: DeleteFileColumnTest
- Defined in:
- lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test__delete_band_image__boolean__should_delete ⇒ Object
- #test__delete_band_image__boolean_false__shouldnt_delete ⇒ Object
- #test__delete_band_image__string__should_delete ⇒ Object
- #test__delete_band_image__string_false__shouldnt_delete ⇒ Object
- #test__file_column_fields ⇒ Object
- #test__just_uploaded__shouldnt_delete ⇒ Object
Instance Method Details
#setup ⇒ Object
4 5 6 7 8 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb', line 4 def setup DeleteFileColumn.generate_delete_helpers(MockModel) @model = MockModel.new @model.band_image = "coolio.jpg" end |
#test__delete_band_image__boolean__should_delete ⇒ Object
14 15 16 17 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb', line 14 def test__delete_band_image__boolean__should_delete @model.delete_band_image = true assert_nil @model.band_image end |
#test__delete_band_image__boolean_false__shouldnt_delete ⇒ Object
25 26 27 28 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb', line 25 def test__delete_band_image__boolean_false__shouldnt_delete @model.delete_band_image = false assert_not_nil @model.band_image end |
#test__delete_band_image__string__should_delete ⇒ Object
19 20 21 22 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb', line 19 def test__delete_band_image__string__should_delete @model.delete_band_image = "true" assert_nil @model.band_image end |
#test__delete_band_image__string_false__shouldnt_delete ⇒ Object
30 31 32 33 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb', line 30 def test__delete_band_image__string_false__shouldnt_delete @model.delete_band_image = "false" assert_not_nil @model.band_image end |
#test__file_column_fields ⇒ Object
10 11 12 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb', line 10 def test__file_column_fields assert_equal(1, @model.file_column_fields.length) end |
#test__just_uploaded__shouldnt_delete ⇒ Object
36 37 38 39 40 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb', line 36 def test__just_uploaded__shouldnt_delete @model.band_image_just_uploaded = true @model.delete_band_image = "true" assert_not_nil(@model.band_image) end |