Skip to content

Commit

Permalink
feat: add RecordType#exposed?
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Apr 20, 2021
1 parent 676d8ef commit 3c2b3fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/dennis/record_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def managed_only?
@hash['managed_only'] == true
end

def exposed?
@hash['exposed'] == true
end

def content_attributes
@hash['content_attributes'].map do |hash|
ContentAttribute.new(hash)
Expand Down
7 changes: 7 additions & 0 deletions spec/specs/record_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Dennis
'A' => have_attributes(
name: 'A',
requires_priority?: false,
exposed?: true,
managed_only?: false,
content_attributes: [
have_attributes(
Expand All @@ -28,12 +29,14 @@ module Dennis
'SOA' => have_attributes(
name: 'SOA',
requires_priority?: false,
exposed?: true,
managed_only?: true,
content_attributes: []
),
'MX' => have_attributes(
name: 'MX',
requires_priority?: true,
exposed?: true,
managed_only?: false,
content_attributes: [
have_attributes(
Expand All @@ -43,8 +46,12 @@ module Dennis
)
]
),
'IPS' => have_attributes(
exposed?: false
),
'CAA' => have_attributes(
name: 'CAA',
exposed?: true,
requires_priority?: false,
managed_only?: false,
content_attributes: [
Expand Down

0 comments on commit 3c2b3fb

Please sign in to comment.