Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
j_platform / spec / controllers / j_platform / projects_controller_spec.rb
Size: Mime:
require 'spec_helper'

describe JPlatform::ProjectsController, :type => :controller do
  include_context "controller setup"
  before(:each) do
    session[:project_id] = 1
  end
  describe "GET show" do
    it "renders project member, social account, and queue infomation" do
      stub_get("/api/v1/projects/1.json?include_client_memberships=true&include_project_ticket_lists=true&include_social_accounts=true").to_return(body: fixture("project_with_members_and_tickets.json"), headers: {content_type: "application/json; charset=utf-8"})
      stub_get("/api/v1/project_memberships.json?project_id=1").to_return(body: fixture("project_memberships.json"), headers: {content_type: "application/json; charset=utf-8"})
      get :show, id: 1, use_route: :project_path
      expect(assigns(:project).id).to eq(1)
      expect(assigns(:members)).not_to be_nil
      expect(assigns(:social_accounts)).not_to be_nil
      expect(assigns(:project_ticket_lists)).not_to be_nil
      expect(response).to render_template :show
    end
  end
end