Skip to content

Commit

Permalink
Closes #19: Creates 'contact' model
Browse files Browse the repository at this point in the history
Why:

* Provide model for Contact

This change addresses the need by:

* Creating the 'contact' model
* Creating the 'contact' factory
* Creating the 'contact' spec
  • Loading branch information
randalhumphries committed Mar 1, 2018
1 parent 50987d5 commit d18f404
Show file tree
Hide file tree
Showing 7 changed files with 358 additions and 34 deletions.
6 changes: 6 additions & 0 deletions app/models/contact.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Contact < ApplicationRecord
validates :contact, presence: true

belongs_to :employee
belongs_to :contact_type
end
50 changes: 41 additions & 9 deletions coverage/.resultset.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,15 @@
null,
null
],
"/Users/randal/Projects/hr_app/spec/factories/contacts.rb": [
1,
1,
1,
1,
1,
null,
null
],
"/Users/randal/Projects/hr_app/spec/factories/emergency_contacts.rb": [
1,
1,
Expand All @@ -263,7 +272,7 @@
1,
1,
1,
27,
29,
1,
1,
null,
Expand All @@ -279,11 +288,11 @@
"/Users/randal/Projects/hr_app/spec/factories/people.rb": [
1,
1,
32,
33,
32,
33,
33,
34,
35,
34,
35,
35,
null,
null
],
Expand Down Expand Up @@ -513,6 +522,29 @@
1,
null
],
"/Users/randal/Projects/hr_app/spec/models/contact_spec.rb": [
1,
null,
1,
null,
1,
1,
null,
null,
1,
1,
null,
null,
null
],
"/Users/randal/Projects/hr_app/app/models/contact.rb": [
1,
1,
null,
1,
1,
null
],
"/Users/randal/Projects/hr_app/spec/models/contact_type_spec.rb": [
1,
null,
Expand Down Expand Up @@ -601,13 +633,13 @@
1,
null,
1,
29,
31,
1,
null,
null,
null,
1,
29,
31,
1,
null,
null,
Expand Down Expand Up @@ -752,6 +784,6 @@
null
]
},
"timestamp": 1519933242
"timestamp": 1519941633
}
}
Loading

0 comments on commit d18f404

Please sign in to comment.