Sha256: fecd898372616e7bae36bd2cac9836e020b368b1fc25b4aaaf0bd5609e51feae
Contents?: true
Size: 933 Bytes
Versions: 6
Compression:
Stored size: 933 Bytes
Contents
require 'spec_helper' describe "admin/accounts/show.html.erb" do let(:trial_plan) { Factory.stub(:plan, :trial => true) } let(:account) { Factory(:account) } let(:user) { Factory.stub(:user) } let(:form_destination) { admin_account_trial_extensions_path(account.keyword) } before { view.stubs(:current_user => user) } def render_account @account = account render end context "with a trial account" do before do account.plan = trial_plan render_account end it "renders trial status" do rendered.should include("This is a trial account") end it 'renders a form to extend the trial' do rendered.should include(%{action="#{form_destination}"}) end end context "without a trial account" do before do render_account end it "does not render trial status" do rendered.should_not include("This is a trial account") end end end
Version data entries
6 entries across 6 versions & 1 rubygems