Commit fe6a451536f89cc1ef3a141a567cf42b12f0c192

Authored by AntonioTerceiro
1 parent d18c6bf1

ActionItem144: initial model for ImageGallery



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1181 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/image_gallery.rb 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +class ImageGallery < Article
  2 +
  3 + def self.short_description
  4 + _('Image gallery')
  5 + end
  6 +
  7 + def self.description
  8 + _('A collection of photos, logos or other kinds of images.')
  9 + end
  10 +
  11 +end
... ...
test/unit/image_gallery_test.rb 0 → 100644
... ... @@ -0,0 +1,19 @@
  1 +require File.dirname(__FILE__) + '/../test_helper'
  2 +
  3 +class ImageGalleryTest < Test::Unit::TestCase
  4 +
  5 + should 'be a type of article' do
  6 + assert_kind_of Article, ImageGallery.new
  7 + end
  8 +
  9 + should 'provide description' do
  10 + ImageGallery.stubs(:==).with(Article).returns(true)
  11 + assert_not_equal Article.description, ImageGallery.description
  12 + end
  13 +
  14 + should 'provide short description' do
  15 + ImageGallery.stubs(:==).with(Article).returns(true)
  16 + assert_not_equal Article.short_description, ImageGallery.short_description
  17 + end
  18 +
  19 +end
... ...