Dear @Didisek,
Thank you for sharing your situation with the Wefugees Community!
Unfortunately, I am not familiar with the Spanish regulations on marriages, but I tried to make some research. I read, for example on this website and also here, that usually at least one part of the couple needs to be a legal resident in Spain for two years in order to get married. It might be true, that an asylum-seeker, whose case is still pending, will have difficulties to fulfill that conditions. Additionally, both persons need to provide a range of documents, as for example certificates of no impediment, passports etc.
As you mentioned already, your partner could also take back his asylum request and ask for an assisted voluntary return. The International Organisation for Migration (IOM) is supporting migrants in this. Every case needs to be assessed individually, but as people from Tunisia also do not have a high chance to get acknowledged as refugees (but as I said, I am not able to assess your partners' case with that little information at all, though!), choosing the alternative path of applying for a family-unification visa might be more likely to succeed.
I hope this helps and please do not hesitate to get back to us with any further question.
All the best,
Meike
I hope this helps