repair database query

This commit is contained in:
yqbk
2016-08-03 14:08:01 +02:00
parent 4183a16178
commit 032c201b94
2 changed files with 3 additions and 1 deletions

View File

@ -73,6 +73,8 @@ class DockerClient
# Headers are required by Docker
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.on :error do |event|

View File

@ -109,7 +109,7 @@ let(:exercise) { FactoryGirl.build(:dummy) }
end
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