combination_steps.rb revision 97758b9192048e1cfcd47106cfba6852b1486edd
97758b9192048e1cfcd47106cfba6852b1486eddTim Reddehase @api_key = FactoryGirl.create :api_key, :invalid
5836ee88700245635cd096f27bdc6279178f4583Tim ReddehaseGiven(/^I have a repository with path: "([^"]+)"$/) do |path|
5836ee88700245635cd096f27bdc6279178f4583Tim Reddehase FactoryGirl.create :permission, subject: @user
5836ee88700245635cd096f27bdc6279178f4583Tim ReddehaseGiven(/^I know of a repository with path: "([^"]+)"$/) do |path|
5836ee88700245635cd096f27bdc6279178f4583Tim Reddehase @repository = FactoryGirl.create :repository, path: path
5836ee88700245635cd096f27bdc6279178f4583Tim ReddehaseWhen(/^I create a combination via the API of these ontologies$/) do
5836ee88700245635cd096f27bdc6279178f4583Tim Reddehase header Api::V1::Base::API_KEY_HEADER, @api_key.try(:key)
5836ee88700245635cd096f27bdc6279178f4583Tim Reddehase request "/#{@repository.path}///combinations",\
5836ee88700245635cd096f27bdc6279178f4583Tim Reddehase input: {nodes: @ontologies.map { |o| o.locid }}.to_json
5836ee88700245635cd096f27bdc6279178f4583Tim ReddehaseThen(/^I should get a (\d+) response$/) do |number|
5836ee88700245635cd096f27bdc6279178f4583Tim Reddehase expect(last_response.status).to eq(number.to_i)
5836ee88700245635cd096f27bdc6279178f4583Tim ReddehaseThen(/^a location\-header to the combination\-ontology$/) do