MaxPerson wrote that dwarves don't cast spells in Tolkien as we understand spells from D&D, not the way a wizard, cleric or bard does. That they instead create magical objects and items.
You contradicted him, and asserted that "dwarves could cast spells".
Every reference in that link is to making magical things, except for a single reference from The Hobbit, about burying and "putting a great many spells over" the treasure of the trolls, which seems more likely to be a reference to Gandalf doing so. Since he's part of the group being discussed in that passage.
The only other reference to dwarves doing magic in The Hobbit is a passage in the chapter The Front Gate, where the dwarves and Bilbo find the hidden door at The Lonely Mountain and fail to open it. "They beat on it, they thrust and pushed at it, they implored it to move, they spoke fragments of broken spells of opening, and nothing stirred. At last tired out they rested on the grass at its feet, and then at evening began their long climb down." That sounds like some of them knew some kind of lore about charms of opening, but this particular instance shows them unable to actually work a functioning spell.