Sha256: 78be060e6c17a7f3b672cf5dda863fe0ef532ab02c2f8712a567198351d22a0e

Contents?: true

Size: 456 Bytes

Versions: 4

Compression:

Stored size: 456 Bytes

Contents

require 'test_helper'

module Kblog
  class ArticleTest < ActiveSupport::TestCase
    test "kind of article" do
		assert_instance_of(Article, Article.new)
    end
		test "save an article" do
			assert Article.create(:title => "Ein Test", :content => "Hier kommt was inhaltlihces")
		end
		test "wont save article without title" do
			article = Article.new(:title => nil, :content => "Hier kommt was inhaltlihces")
			assert ! article.save 
		end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kblog-0.0.4 test/unit/kblog/article_test.rb
kblog-0.0.3 test/unit/kblog/article_test.rb
kblog-0.0.2 test/unit/kblog/article_test.rb
kblog-0.0.1 test/unit/kblog/article_test.rb