Skip to content

Commit

Permalink
change episode number to identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
eveadele committed Oct 16, 2014
1 parent b500faf commit 214b197
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/representers/api/story_representer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Api::StoryRepresenter < Api::BaseRepresenter
property :short_description
property :description
property :episode_number
property :episode_date
property :episode_identifier
property :published_at
property :produced_on
property :points
Expand Down
6 changes: 4 additions & 2 deletions test/representers/api/story_representer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@
describe 'series info' do
let(:schedule) { create(:schedule) }
let(:series) { schedule.series }
let(:story) { build_stubbed(:story, series: series, episode_number: 2) }
let(:story) { build_stubbed(:story,
series: series,
episode_identifier: '#2') }
let(:representer) { Api::StoryRepresenter.new(story) }
let(:json) { JSON.parse(representer.to_json) }

Expand All @@ -81,7 +83,7 @@
end

it 'includes episode number' do
json['episodeNumber'].must_equal 2
json['episodeIdentifier'].must_equal '#2'
end

it 'includes episode date' do
Expand Down

0 comments on commit 214b197

Please sign in to comment.