This repository was archived by the owner on Oct 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,11 @@ def valid?
1616 private
1717
1818 def has_word_count?
19- @description . split . size > MIN_WORD_COUNT - 1
19+ if has_jira_ticket?
20+ @description . split . size > 1
21+ else
22+ @description . split . size > 0
23+ end
2024 end
2125
2226 def has_calls_tag?
@@ -45,4 +49,4 @@ def internal_employee
4549 has_word_count? && ( has_calls_tag? || has_url? || has_jira_ticket? )
4650 end
4751 end
48- end
52+ end
Original file line number Diff line number Diff line change 4545 expect ( validator . valid? ) . to eql ( true )
4646 end
4747
48- it "will pass if it has a keyword" do
49- entry = Entry . new ( description : "This is an English class entry" )
50- validator = TimeEntry ::DescriptionRules . new ( entry )
51- expect ( validator . valid? ) . to eql ( true )
52-
53- entry = Entry . new ( description : "1:1 with Amanda entry" )
54- validator = TimeEntry ::DescriptionRules . new ( entry )
55- expect ( validator . valid? ) . to eql ( true )
56-
57- entry = Entry . new ( description : "Email/Slack catch up entry" )
58- validator = TimeEntry ::DescriptionRules . new ( entry )
59- expect ( validator . valid? ) . to eql ( true )
60- end
61-
6248 it "will fail if too short" do
63- entry = Entry . new ( description : "[OSS-136]: added" )
64- validator = TimeEntry ::DescriptionRules . new ( entry )
65- expect ( validator . valid? ) . to eql ( false )
66-
67- entry = Entry . new ( description : "http://www.example.com added" )
49+ entry = Entry . new ( description : "[OSS-136]" )
6850 validator = TimeEntry ::DescriptionRules . new ( entry )
6951 expect ( validator . valid? ) . to eql ( false )
7052
71- entry = Entry . new ( description : "#calls added " )
53+ entry = Entry . new ( description : "" )
7254 validator = TimeEntry ::DescriptionRules . new ( entry )
7355 expect ( validator . valid? ) . to eql ( false )
7456 end
8062 end
8163 end
8264 end
83- end
65+ end
You can’t perform that action at this time.
0 commit comments