Gentoo Archives: gentoo-commits

From: Alex Legler <a3li@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/glsamaker:master commit in: test/unit/
Date: Sat, 26 Feb 2011 10:55:28
Message-Id: 4b251b07093daf61bc2f93cdb200bec63c63c543.a3li@gentoo
1 commit: 4b251b07093daf61bc2f93cdb200bec63c63c543
2 Author: Alex Legler <alex <AT> a3li <DOT> li>
3 AuthorDate: Sat Feb 26 10:54:40 2011 +0000
4 Commit: Alex Legler <a3li <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 26 10:54:40 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/glsamaker.git;a=commit;h=4b251b07
7
8 Test GLSA request creating
9
10 ---
11 test/unit/glsa_test.rb | 16 ++++++++++++++++
12 1 files changed, 16 insertions(+), 0 deletions(-)
13
14 diff --git a/test/unit/glsa_test.rb b/test/unit/glsa_test.rb
15 index e412baf..a8222bf 100644
16 --- a/test/unit/glsa_test.rb
17 +++ b/test/unit/glsa_test.rb
18 @@ -20,6 +20,22 @@ class GLSATest < ActiveSupport::TestCase
19 assert glsa.save
20 end
21
22 + test "new request" do
23 + glsa = Glsa.new_request(
24 + "Some title",
25 + "236060, 260006",
26 + "some comment",
27 + "public",
28 + false,
29 + users(:test_user)
30 + )
31 +
32 + assert_equal(glsa.last_revision.title, "Some title")
33 + assert_equal(glsa.last_revision.bugs.map{|bug| bug.bug_id}.sort, [236060, 260006])
34 + assert_equal(glsa.comments.first.text, "some comment")
35 + assert !glsa.restricted
36 + end
37 +
38 test "adding bulk references" do
39 glsa = glsas(:glsa_two)