-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code needs to be cleaned because: - channelId refers to the subscriber - YouTube says channelTitle is returned but it's always nil - might or might not be a good idea to inherit Subscription from Resource
- Loading branch information
claudiob
committed
Jul 7, 2014
1 parent
61daa67
commit a25424a
Showing
5 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# encoding: UTF-8 | ||
|
||
require 'spec_helper' | ||
require 'yt/models/subscription' | ||
|
||
describe Yt::Subscription, :device_app do | ||
subject(:subscription) { Yt::Subscription.new id: id, auth: $account } | ||
|
||
context 'given one of my subscriptions' do | ||
let(:id) { '5GRxNxk3IHLSRtWOUojJ3SwPvDooXERDBk1D2gNfcQU' } # TODO !!!! MAKE AN ENV !!!!! | ||
|
||
it 'returns valid snippet data' do | ||
expect(subscription.snippet).to be_a Yt::Snippet | ||
expect(subscription.title).to be_a String | ||
expect(subscription.description).to be_a Yt::Description | ||
expect(subscription.thumbnail_url).to be_a String | ||
expect(subscription.published_at).to be_a Time | ||
end | ||
end | ||
end |