Last active
December 17, 2015 14:39
-
-
Save igkuz/5625871 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
describe Telemarker::Aplplication do | |
include_context :telemarker_app | |
let(:channels_api_controller) { app.controller('api/controller') } | |
let(:channels_view) { app.view('channels') } | |
describe "Channels View Controller" do | |
it "should get all channels" do | |
channels_controller = Telemarker::Controllers::View::VideosController.new(channels_view, channels_api_controller) | |
stub_requested = stub_request(:get, channels_url). | |
with(body: {credentials: credentials}). | |
to_return(status: 200, body: load_fixture('channels.json'), headers: {}) | |
channels_controller.show_channels_list | |
run_requests | |
assert_requested stub_requested | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment