Sha256: 76229dcd16468e4f0e82d2685d8ed751dd2d6852a5921d87d1391ecc741623e9
Contents?: true
Size: 651 Bytes
Versions: 37
Compression:
Stored size: 651 Bytes
Contents
# frozen_string_literal: true require "spec_helper" shared_examples_for "categorizable interface" do let!(:category) { create(:category, participatory_space: model.participatory_space) } describe "category" do let(:query) { "{ category { id } }" } context "when model has category" do before do model.update(category: category) end it "has a category" do expect(response).to include("category" => { "id" => category.id.to_s }) end end context "when model has no category" do it "returns null" do expect(response).to include("category" => nil) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems