Sha256: 961c5bb67d3f2c48a46563b175fc194dd3be3d27c9d2960ea257251bc5e67e40

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

require 'spec_helper'

feature Cadenero::V1::Account do
  scenario "can be created with an owner" do
    params = {
      :name => "Test Account",
      :subdomain => "test",
      :owner_attributes => {
        :email => "user@example.com",
        :password => "password",
        :password_confirmation => "password"
      }
    }
    account = Cadenero::V1::Account.create_with_owner(params)
    account.users.first.should == account.owner
  end

  it "cannot create an account without a subdomain" do
    account = Cadenero::V1::Account.create_with_owner
    account.should_not be_valid
    account.users.should be_empty
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cadenero-0.0.2.a3 spec/features/cadenero/account_spec.rb