thingspeak/spec/controllers/charts_controller_spec.rb

25 lines
563 B
Ruby
Raw Normal View History

2011-03-27 22:56:15 +02:00
require 'spec_helper'
describe ChartsController do
before :each do
@user = FactoryGirl.create(:user)
controller.stub(:current_user).and_return(@user)
controller.stub(:current_user_session).and_return(true)
@channel = FactoryGirl.create(:channel, :user => @user)
end
describe "responding to a GET index" do
render_views
it "has a 'select' selector for 'dynamic'" do
get :index, :channel_id => @channel.id
response.should be_successful
response.should have_selector("select#dynamic_0")
end
end
2011-03-27 22:56:15 +02:00
end