From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PtHo8-0005bl-43 for garchives@archives.gentoo.org; Sat, 26 Feb 2011 10:55:28 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 34344E04CB; Sat, 26 Feb 2011 10:55:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 05AF8E04CB for ; Sat, 26 Feb 2011 10:55:19 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 675261B4140 for ; Sat, 26 Feb 2011 10:55:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D2D618006E for ; Sat, 26 Feb 2011 10:55:18 +0000 (UTC) From: "Alex Legler" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alex Legler" Message-ID: <4b251b07093daf61bc2f93cdb200bec63c63c543.a3li@gentoo> Subject: [gentoo-commits] proj/glsamaker:master commit in: test/unit/ X-VCS-Repository: proj/glsamaker X-VCS-Files: test/unit/glsa_test.rb X-VCS-Directories: test/unit/ X-VCS-Committer: a3li X-VCS-Committer-Name: Alex Legler X-VCS-Revision: 4b251b07093daf61bc2f93cdb200bec63c63c543 Date: Sat, 26 Feb 2011 10:55:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: b254a0fbe6e793e8db329ac6d071553c commit: 4b251b07093daf61bc2f93cdb200bec63c63c543 Author: Alex Legler a3li li> AuthorDate: Sat Feb 26 10:54:40 2011 +0000 Commit: Alex Legler gentoo org> CommitDate: Sat Feb 26 10:54:40 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/glsamaker.git= ;a=3Dcommit;h=3D4b251b07 Test GLSA request creating --- test/unit/glsa_test.rb | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/test/unit/glsa_test.rb b/test/unit/glsa_test.rb index e412baf..a8222bf 100644 --- a/test/unit/glsa_test.rb +++ b/test/unit/glsa_test.rb @@ -20,6 +20,22 @@ class GLSATest < ActiveSupport::TestCase assert glsa.save end =20 + test "new request" do + glsa =3D Glsa.new_request( + "Some title",=20 + "236060, 260006", + "some comment",=20 + "public",=20 + false, + users(:test_user) + ) + =20 + assert_equal(glsa.last_revision.title, "Some title") + assert_equal(glsa.last_revision.bugs.map{|bug| bug.bug_id}.sort, [23= 6060, 260006]) + assert_equal(glsa.comments.first.text, "some comment") + assert !glsa.restricted + end + =20 test "adding bulk references" do glsa =3D glsas(:glsa_two) =20