spec/conglomerate_spec.rb in conglomerate-0.2.1 vs spec/conglomerate_spec.rb in conglomerate-0.3.0
- old
+ new
@@ -13,11 +13,11 @@
event_url(item.event_id)
end
attribute :roster_id, :rel => :roster do |item|
roster_url(item.roster_id)
end
- attribute :team_ids, :rel => :teams do |item|
+ attribute :team_ids, :rel => :teams, :type => :array do |item|
team_url(item.team_ids.join(","))
end
attribute :user_ids, :rel => :users do |item|
user_url(item.user_ids.join(","))
end
@@ -154,10 +154,10 @@
"data" => [
{"name" => "description", "value" => "Tasty Burgers"},
{"name" => "id", "value" => 1},
{"name" => "event_id", "value" => 2},
{"name" => "roster_id", "value" => nil},
- {"name" => "team_ids", "value" => [1,2]},
+ {"name" => "team_ids", "array" => [1,2]},
{"name" => "user_ids", "value" => []}
],
"links" => [
{"rel" => "event", "href" => "https://example.com/events/2"},
{"rel" => "teams", "href" => "https://example.com/teams/1,2"}