From 69698aacbc237f6b9cbabae8eef2b7438f505466 Mon Sep 17 00:00:00 2001 From: Andrew8xx8 Date: Mon, 18 Feb 2013 13:41:32 +0400 Subject: [PATCH] Additional tests added to Issue --- spec/models/issue_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index f72fed22..99d9f65b 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -43,4 +43,16 @@ describe Issue do subject.is_being_reassigned?.should be_false end end + + describe '#is_being_reassigned?' do + it 'returnes issues assigned to user' do + user = create :user + + 2.times do + issue = create :issue, assignee: user + end + + Issue.open_for(user).count.should eq 2 + end + end end