Add new GraphQL type for milestones

- added the milestone type to be displayed with investments
- the corresponding spec
This commit is contained in:
cyrillefr
2024-07-02 15:47:42 +02:00
committed by Javi Martín
parent 5ec6337d47
commit 18323a36c3
8 changed files with 38 additions and 0 deletions

View File

@@ -678,6 +678,16 @@ describe "Consul Schema" do
end
end
describe "Milestone" do
it "formats publication date like in view" do
milestone = create(:milestone, publication_date: Time.zone.parse("2024-07-02 11:45:17"))
response = execute("{ milestone(id: #{milestone.id}) { id publication_date } }")
received_publication_date = dig(response, "data.milestone.publication_date")
expect(received_publication_date).to eq "2024-07-02"
end
end
describe "Budget investment" do
it "does not include hidden comments" do
budget = create(:budget)