repair database query
This commit is contained in:
@ -73,6 +73,8 @@ class DockerClient
|
|||||||
# Headers are required by Docker
|
# Headers are required by Docker
|
||||||
headers = {'Origin' => 'http://localhost'}
|
headers = {'Origin' => 'http://localhost'}
|
||||||
|
|
||||||
|
|
||||||
|
# rspec error: undefined method `+' for nil:NilClass. problem with ws_host?
|
||||||
socket = Faye::WebSocket::Client.new(DockerClient.config['ws_host'] + '/containers/' + @container.id + '/attach/ws?' + query_params, [], :headers => headers)
|
socket = Faye::WebSocket::Client.new(DockerClient.config['ws_host'] + '/containers/' + @container.id + '/attach/ws?' + query_params, [], :headers => headers)
|
||||||
|
|
||||||
socket.on :error do |event|
|
socket.on :error do |event|
|
||||||
|
@ -109,7 +109,7 @@ let(:exercise) { FactoryGirl.build(:dummy) }
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "does not include other authors' non-public exercises" do
|
it "does not include other authors' non-public exercises" do
|
||||||
expect(scope.map(&:id)).not_to include(*Exercise.where(public: false).where(user_id <> #{@teacher.id}").map(&:id))
|
expect(scope.map(&:id)).not_to include(*Exercise.where(public: false).where("user_id <> #{@teacher.id}").map(&:id))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user