require 'spec_helper'
let(:repository) { create :repository }
before { stub_cp_keys }
before do
get :index, repository_id: repository.to_param, key_id: nil, permission: 'write'
end
it { should respond_with :success }
end
end
before do
get :index, repository_id: repository.to_param, key_id: key.id.to_s, permission: 'write'
end
it { should respond_with :success }
end
end
end
before do
get :index, repository_id: repository.to_param, key_id: key.id.to_s, permission: 'read'
end
it { should respond_with :success }
end
end
end
before do
get :index, repository_id: repository.to_param, key_id: key.id.to_s, permission: 'write'
end
it { should respond_with :success }
end
end
end
end