Commit 89d2368c authored by charlie ablett's avatar charlie ablett

Refactor tests to use nodes

parent d63a0234
...@@ -31,8 +31,8 @@ RSpec.describe 'Getting designs related to an issue' do ...@@ -31,8 +31,8 @@ RSpec.describe 'Getting designs related to an issue' do
post_graphql(query(note_fields), current_user: nil) post_graphql(query(note_fields), current_user: nil)
designs_data = graphql_data['project']['issue']['designs']['designs'] designs_data = graphql_data['project']['issue']['designs']['designs']
design_data = designs_data['edges'].first['node'] design_data = designs_data['nodes'].first
note_data = design_data['notes']['edges'].first['node'] note_data = design_data['notes']['nodes'].first
expect(note_data['id']).to eq(note.to_global_id.to_s) expect(note_data['id']).to eq(note.to_global_id.to_s)
end end
...@@ -40,14 +40,10 @@ RSpec.describe 'Getting designs related to an issue' do ...@@ -40,14 +40,10 @@ RSpec.describe 'Getting designs related to an issue' do
def query(note_fields = all_graphql_fields_for(Note)) def query(note_fields = all_graphql_fields_for(Note))
design_node = <<~NODE design_node = <<~NODE
designs { designs {
edges { nodes {
node { notes {
notes { nodes {
edges { #{note_fields}
node {
#{note_fields}
}
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment