Sha256: cfe29938e06d61b3ffc989ca4ddc6e7be47109f51a0a1bf43cc6f3892b1bf718
Contents?: true
Size: 798 Bytes
Versions: 3
Compression:
Stored size: 798 Bytes
Contents
require 'spec_helper' module Cadenero describe V1::AccountsController do context "creates the account's schema" do let!(:account) { stub_model(Cadenero::V1::Account) } before do Cadenero::V1::Account.should_receive(:create_with_owner).and_return(account) account.stub :valid? => true controller.stub(:force_authentication!) end it "should create a schema and ensure a token is returned for the account on successful creation" do account.should_receive(:create_schema) account.should_receive(:ensure_authentication_token!) post :create, account: { name: "First Account", subdomain: "first" }, use_route: :cadenero expect(account.authentication_token).not_to eq nil end end end end
Version data entries
3 entries across 3 versions & 1 rubygems