Sha256: b8d15edc98e980129c0155ca723c39a1057e03d16660c92fc67fc18446ad11e7

Contents?: true

Size: 706 Bytes

Versions: 51

Compression:

Stored size: 706 Bytes

Contents

require 'spec_helper'

module Manage

  describe PostsController do
    render_views
    routes { Manage::Engine.routes }

    before do
      @admin = AdminUser.create!(email: 'admin@some.gf', password: '11223344', password_confirmation: '11223344')
      sign_in @admin

      @user = User.create!(email: 'some@do.cd', username: 'Sandokan')
      @user.posts.create(content: 'Some')
      @user.save!
    end

    it 'Shows only index fields listed' do
      get :index
      body = response.body

      body.should include(@user.email)
      body.should include(@user.username)
      body.should include(@user.posts.first.id.to_s)
      body.should include(@user.posts.first.content)
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
manage-1.4.3 spec/controllers/manage/resource_controller_spec.rb
manage-1.4.2 spec/controllers/manage/resource_controller_spec.rb
manage-1.4.1 spec/controllers/manage/resource_controller_spec.rb
manage-1.4 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.52 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.51 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.50 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.49 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.48 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.47 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.46 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.45 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.44 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.43 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.42 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.40 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.39 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.38 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.37 spec/controllers/manage/resource_controller_spec.rb
manage-1.3.36 spec/controllers/manage/resource_controller_spec.rb