Skip to content

Commit

Permalink
Exposed venue type (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
mroloux authored May 29, 2024
1 parent f048117 commit 23ab45d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/seatsio/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Chart

attr_reader :id, :key, :status, :name, :published_version_thumbnail_url,
:draft_version_thumbnail_url, :events, :tags, :archived,
:categories, :validation
:categories, :validation, :venue_type

def initialize(data)
@id = data['id']
Expand All @@ -21,6 +21,7 @@ def initialize(data)
@tags = data['tags']
@archived = data['archived']
@validation = data['validation']
@venue_type = data['venueType']
end
end

Expand Down
7 changes: 3 additions & 4 deletions test/charts/list_all_charts_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,17 @@ def test_with_validation
@seatsio.charts.create

retrieved_charts = @seatsio.charts.list(with_validation: true).to_a
validations = retrieved_charts.collect {|chart| chart.validation}

assert_equal(validations, [{"errors" => [], "warnings" => []}])
assert_equal({"errors" => [], "warnings" => []}, retrieved_charts[0].validation)
assert_equal("MIXED", retrieved_charts[0].venue_type)
end

def test_without_validation
@seatsio.charts.create

retrieved_charts = @seatsio.charts.list().to_a
validations = retrieved_charts.collect {|chart| chart.validation}

assert_equal(validations, [nil])
assert_equal(nil, retrieved_charts[0].validation)
end

def test_without_charts
Expand Down

0 comments on commit 23ab45d

Please sign in to comment.